pip: Can't uninstall packages installed with `-e`, or when providing a directory name
This seems to he the same as #1895 which was closed without steps to reproduce. edit this is a duplicate of #4431
When installing packages using -e, you can’t uninstall them using pip, you just get Can’t uninstall python-jsonstore. No files were found to uninstall.
To reproduce in Docker:
docker pull ubuntu:16.04 && docker run -it --rm ubuntu:16.04
apt-get update --yes
apt-get install --yes git python python-pip
pip install --upgrade pip==9.0.1
git clone -b 1.0.0 https://github.com/Code0x58/python-jsonstore.git
pip install -e python-jsonstore/
pip uninstall python-jsonstore
The error message comes up when trying to uninstall the package name, but there is nothing if you uninstall the directory - either way the module remains installed as python -m jsonstore.tests runs.
Running with -v shows it falls through to this branch, where dist.location is the directory given to pip install -e.
It is probably a separate issue that you don’t get output (or a return code) when trying to uninstall a package that was installed from a directory - it should work or raise an exception like when you give a bad package name to uninstall.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 17
- Comments: 20 (9 by maintainers)
I’m facing the same problem on Pip 9.0.1. But I have a custom
PIP_PREFIX. When usingpip install ., and I can laterpip uninstall package-name. But if I usepip install -e ., thenpip uninstall package-nameresults inCan't uninstall 'package-name'. No files were found to uninstall..Can we please reopen this issue? I still can’t uninstall packages that were installed with
-eunless I use the manual steps outlined here. I’m using the latest pip (18.0) in a virtualenv, Ubuntu 16.04.@pypa/pip-committers: I think this can be closed.