I deleted a pip package with rm -rf
command thinking that the package will be removed. Now the package has been deleted but it still shows up in pip list<
site-packages
directory where pip is installing your packages.psycopg2
directory).pip install YOUR-PACKAGE
I'm sure there's a better way to achieve this and I would like to read about it, but a workaround I can think of is this:
rm
'ed directory to the original machine (ssh, ftp, whatever).pip uninstall
the package (should work again then).But, yes, I'd also love to hear about a decent solution for this situation.
packages installed using pip can be uninstalled completely using
pip uninstall <package>
refrence link
pip uninstall
is likely to fail if the package is installed using python setup.py install
as they do not leave behind metadata to determine what files were installed.
packages still show up in pip list
if their paths(.pth file) still exist in your site-packages or dist-packages folder. You'll need to remove them as well in case you're removing using rm -rf
I met the same issue while experimenting with my own Python library and what I've found out is that pip freeze
will show you the library as installed if your current directory contains lib.egg-info
folder. And pip uninstall <lib>
will give you the same error message.
egg-info
folderspip show <lib-name>
to see the details about the location of the library, so you can remove files manually.