Uninstall from pip --user install fails (sometimes)
See original GitHub issueSteps to reproduce:
- pip install --user PACKAGENAME
- pip uninstall PACKAGENAME (no --user)
What should happen:
Package is installed and uninstalled.
What happens instead:
Uninstall fails with Can't uninstall 'PACKAGE'. No files were found to uninstall.
Notes:
This is not the case with all packages. I can’t determine if the issue is with the packages or pip. I know that in all cases I have encountered .local/lib/python2.7/site-packages/PACKAGE-VERSION-py2.7.egg-info/installed-files.txt exists.
Examples of failing packages include: https://github.com/berdario/pew/issues/39 and https://github.com/hayd/pep8radius/issues/77 but, for example, youtube-dl works.
This is running pip 1.5.4 on Ubuntu 14.04 LTS.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to uninstall a package installed with pip install --user
If the package is installed at both places, only the local one will be uninstalled. To uninstall the package system-wide using pip ,...
Read more >pip Command Not Found – Mac and Linux Error Solved
Sometimes when you are installing packages, you might face the error: pip: command not found . This error could be due to the...
Read more >Pip upgrade to 22.3 windows10 - Discussions on Python.org
Hi all, I'm trying to upgrade my pip version. I'm running in cmd promtp as admin and my error is this When I...
Read more >How to install modules with PIP (and fix it when it fails) - Medium
How to use PIP. Installing modules to python is painfully easy. Simply open up your terminal: Windows — Command Prompt (CMD); MacOS —...
Read more >Changelog - pip documentation v22.3.1
When dist-info/INSTALLER is present and contains some useful information, the info is included in the error message instead: ERROR: Cannot uninstall foobar 0.1, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This appears to not be a problem now, if you’re still having this issue please reopen this ticket or open a new one with reproduction steps.
This is still a problem on a Debian system, with debian distributed packages. I’m not administrating the system, and I just wanted to update my version of numpy. There exists a quite old version of numpy in
/usr/lib/python2.7/dist-packages
I run the following
The first command installs numpy, but it is not available in python, as the Debian packages precedes user packages in sys.path. The only non-sudo workaround i found is to modify sys.path inside each python script.
The next command fails as it tries to uninstall numpy from
/usr/lib/python2.7/dist-packages