I am trying to upgrade PACKAGENAME using the following:
pip install --index http://pypi.MYSITE.com/simple/ --upgrade PACKAGENAME
I often see that no files are downloaded from the server and pip
says all packages were installed successfully, but when I check the version installed it is not the newest version on the server.
However, if I delete pip
's cache and run the above command again, it does download files from the server and install the newest version. Has anyone experienced this issue?
One workaround I found is to pass the --ignore-installed
argument to pip install
, but this causes pip
to download all packages from server even if the newest version is already installed.
If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir command. If you are using an older version of pip than upgrade it with pip install -U pip. This will help you clear pip cache.
The caching mechanism allows pip to improve the download and installation of the packages. This is because pip does not need to download already existing packages. In some cases, pip may not need to redownload a package when updating if it already exists in the cache.
A new dependency resolver was released, and it's obviously causing this ridiculous infinite loop downloading all previous versions. The article above mentions that You can use the deprecated (old) resolver, using the flag --use-deprecated=legacy-resolver, until we remove it in the pip 21.0 release in January 2021.
It is the issue in pip 1.3.1, I met same problem in Ubuntu 12.10 and Windows, Upgrade to pip 1.4 (so far latest) can solve this problem
There are conflicts in the cache, if you upgrade to 1.4 like using virtualenv if you don't want to update the real environment, you will see the error message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With