Package left un-upgraded with pip install --upgrade
· Issue #10613 · pypa/pip (original) (raw)
Description
When upgrading both datasets
and fsspec
in an environment, only datasets
was upgraded to the latest version even though there was nothing constraining fsspec
from being updated. fsspec
is a dependency of datasets
(fsspec[http]>=2021.05.0
is specified in its setup.py), and from looking at the resolver's debug output, it seems that pip is preferring to use the pre-installed version of fsspec
instead of the newer one.
The documentation for --upgrade
says, "Upgrade all specified packages to the newest available version." Unless I'm misunderstanding, all packages explicitly listed on the command line should have been updated if possible.
Expected behavior
fsspec
should be upgraded to 2021.10.1
.
pip version
21.3.1
Python version
3.7.12
OS
macOS 10.15.7
How to Reproduce
- Create a file named
pip_fsspec_test.sh
with the following contents:
#!/usr/bin/env bash
set -euxo pipefail
Prepare environment
python --version pip install -U pip setuptools wheel pip list
Install outdated packages
pip install datasets==1.13.3 fsspec==2021.10.0 pip list --outdated
Attempt to upgrade both packages
pip install -U 'datasets<=1.14.0' 'fsspec<=2021.10.1' pip list --outdated
- Run
bash pip_fsspec_test.sh &> pip_fsspec_log.txt
in a new environment to create pip_fsspec_log.txt. - Change the penultimate line of the script to
PIP_RESOLVER_DEBUG=1 pip -vvv install -U 'datasets<=1.14.0' 'fsspec<=2021.10.1'
. - Run
bash pip_fsspec_test.sh &> pip_fsspec_verbose_log.txt
in a new environment to create pip_fsspec_verbose_log.txt.
Output
See files under "How to Reproduce".
Code of Conduct
- I agree to follow the PSF Code of Conduct.