如果是从源代码安装的,如何卸载软件包管理器"pip"? [英] How do you uninstall the package manager "pip", if installed from source?
问题描述
我不知道可以通过操作系统的软件包管理器安装pip,因此我使用以下命令通过源代码编译并安装了pip:
I was unaware that pip could be installed via my operating system's package manager, so I compiled and installed pip via source with the following command:
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
我想卸载pip,而是从操作系统的程序包管理器中安装它.我将如何完全撤消安装脚本的工作?
I would like to uninstall pip, and instead install it from my operating system's package manager. How would I go about completely undoing the work of the installation script?
推荐答案
这样,您就没有安装pip,而只安装了easy_install
即setuptools
.
That way you haven't installed pip, you installed just the easy_install
i.e. setuptools
.
首先,您应使用删除通过easy_install
安装的所有软件包(请参见卸载):
First you should remove all the packages you installed with easy_install
using (see uninstall):
easy_install -m PackageName
如果您是使用easy_install pip
安装的,则包括pip
.
This includes pip
if you installed it using easy_install pip
.
此后,按照
After this you remove the setuptools
following the instructions from here:
如果在全局site-packages目录中找到setuptools软件包, 您可以安全地删除以下文件/目录:
If setuptools package is found in your global site-packages directory, you may safely remove the following file/directory:
setuptools-*.egg
如果setuptools安装在其他位置,例如用户站点目录 (例如:〜/.local,〜/Library/Python或%APPDATA%),则可以安全删除 以下文件:
If setuptools is installed in some other location such as the user site directory (eg: ~/.local, ~/Library/Python or %APPDATA%), then you may safely remove the following files:
pkg_resources.py
easy_install.py
setuptools/
setuptools-*.egg-info/
这篇关于如果是从源代码安装的,如何卸载软件包管理器"pip"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!