pip: pip install --user -U fails to upgrade packages
- Pip version: 10.0.0b2
- Python version: 2.7.14
- Operating system: Ubuntu 17.10
Description:
I ran pip list --user --outdated
, saw that I had freezegun
0.3.7 in my ~/.local/lib/python2.7/site-packages, and tried to upgrade it with pip install --user -U freezegun
. This did not work:
Requirement already satisfied: freezegun in /home/mg/.local/lib/python2.7/site-packages (0.3.7)
Then I downgraded pip to 9.0.3 with pip install "pip<10"
and tried the pip install --user -U freezegun
again, and it successfully upgraded the freezegun … I think?
Cache entry deserialization failed, entry ignored
Collecting freezegun
Using cached freezegun-0.3.10-py2.py3-none-any.whl
Cache entry deserialization failed, entry ignored
Requirement already up-to-date: six in /home/mg/.venv/lib/python2.7/site-packages (from freezegun)
Collecting python-dateutil!=2.0,>=1.0 (from freezegun)
Using cached python_dateutil-2.7.2-py2.py3-none-any.whl
Installing collected packages: python-dateutil, freezegun
Found existing installation: freezegun 0.3.7
Not uninstalling freezegun at /home/mg/.local/lib/python2.7/site-packages, outside environment /home/mg/.venv
Successfully installed freezegun-0.3.10 python-dateutil-2.7.2
You are using pip version 9.0.3, however version 10.0.0b2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(Despite the scary “not uninstalling …, outside environment” warning, pip list --user
confirms that I’ve freezegun 0.3.10 in my ~/.local/lib/python2.7/site-packages now.)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (8 by maintainers)
OK. So that’s your issue - “not uninstalling …, outside environment” is because you’re using the pip from that environment and it is not able to uninstall code that wasn’t installed into that environment’s site-packages. Hence the brokenness on upgrades.