question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uninstall from pip --user install fails (sometimes)

See original GitHub issue

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: 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:closed
  • Created 9 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dstufftcommented, 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.

0reactions
foldagercommented, May 24, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found