问题描述
我以rm -rf
命令删除了一个点子软件包,认为该软件包将被删除.现在,该软件包已被删除,但仍显示在pip list
中,并且无法使用pip uninstall
删除它,也无法使用pip install --upgrade
更新.
我想将其完全删除.谁能告诉我如何?
编辑
程序包是psycopg2.
如果我尝试卸载:
hammad@hammad-P5QL-E:~$ pip uninstall psycopg2
Can't uninstall 'psycopg2'. No files were found to uninstall.
这是psycopg2所在的目录/usr/lib/python2.7/dist-packages
,我rm -rf
从同一目录中找到它.
TIA
使用pip安装的软件包可以使用
完全卸载
pip uninstall <package>
如果使用python setup.py install
安装软件包,则 pip uninstall
可能会失败,因为它们不会留下元数据来确定安装了哪些文件.
pip uninstall <package>
软件包的路径(.pth文件)仍然存在于您的site-packages或dist-packages文件夹中,则它们仍会显示在pip list
中.如果要使用rm -rf
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
and I'm unable to remove it with pip uninstall
nor can I update with pip install --upgrade
.
I'd like to remove it completely. Can anyone please tell me how?
EDIT
The package is psycopg2.
If I try to uninstall :
hammad@hammad-P5QL-E:~$ pip uninstall psycopg2
Can't uninstall 'psycopg2'. No files were found to uninstall.
This is the directory in which psycopg2 was located /usr/lib/python2.7/dist-packages
and I rm -rf
'd it from the same directory.
TIA
packages installed using pip can be uninstalled completely using
pip uninstall <package>
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
这篇关于手动删除pip包后如何删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!