Skip to content

Uninstall from pip --user install fails (sometimes) #2094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lofidevops opened this issue Oct 14, 2014 · 5 comments
Closed

Uninstall from pip --user install fails (sometimes) #2094

lofidevops opened this issue Oct 14, 2014 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@lofidevops
Copy link

Steps 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: pew-org/pew#39 and hayd/pep8radius#77 but, for example, youtube-dl works.

This is running pip 1.5.4 on Ubuntu 14.04 LTS.

@KarlManong
Copy link

got the same problem in virtualenv

@piotr-dobrogost
Copy link

As pip uninstall does not have --user option unlike pip install the question is if there even exists a way to uninstall package installed with pip install --user?

@lofidevops
Copy link
Author

For me, this typically works:

pip install --user PACKAGE
pip uninstall PACKAGE

On the face of it, pip uninstall --user might be better?

Notes: the packages mentioned in the ticket started working after they offered Wheel-based packages. Not sure if this is a solution or a workaround.

@dstufft
Copy link
Member

dstufft commented Mar 22, 2017

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.

@dstufft dstufft closed this as completed Mar 22, 2017
@foldager
Copy link

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

pip install --user --upgrade numpy
pip uninstall numpy

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

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants