Python 如何完全卸载用easy_install安装的pip?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22051158/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to fully uninstall pip installed with easy_install?
提问by Rolando
On Windows 7, I install pip with easy_install and want to install a lower version of pip. I want to remove the old version, but have no idea how to completely remove the pip installed by easy_install (or if there is a way to do it without going through easy_install, that is fine). How do I do this?
在 Windows 7 上,我使用 easy_install 安装 pip 并想安装较低版本的 pip。我想删除旧版本,但不知道如何完全删除easy_install安装的pip(或者如果有一种方法可以在不通过easy_install的情况下进行,那很好)。我该怎么做呢?
采纳答案by Heikki Toivonen
There is no completely automatic uninstall but you can do it in two steps:
没有完全自动卸载,但您可以分两步完成:
easy_install -m pip
This should remove pip from easy-install.pthand print the full path to where pip is installed. Now just manually remove the path that the previous command printed. Or you could just manually edit easy-install.pthand remove the pip sources if you know where they are located.
这应该删除 pipeasy-install.pth并打印安装 pip 的完整路径。现在只需手动删除上一个命令打印的路径。或者,easy-install.pth如果您知道它们的位置,您可以手动编辑和删除 pip 源。
回答by Sravya
To uninstall pip in windows:
要在 Windows 中卸载 pip:
- Run command prompt as administrator
- Give the command
easy_install -m pip - This may not uninstall pip completely. So again give this command
pip uninstall pipIf by previous command pip got uninstalled then this command wont run, else it will completely remove pip - Now check by giving command
pip --versionThis should give pip is not recognized as an internal or external command
- 以管理员身份运行命令提示符
- 发出指令
easy_install -m pip - 这可能无法完全卸载 pip。所以再次给出这个命令
pip uninstall pip如果通过以前的命令 pip 被卸载了那么这个命令将不会运行,否则它将完全删除 pip - 现在通过给出命令检查
pip --version这应该给出 pip 未被识别为内部或外部命令
回答by TT--
I found that the following command worked.
我发现以下命令有效。
It deleted the installed files and the .eggdirectory.
It also provided a confirmation prompt.
它删除了安装的文件和.egg目录。它还提供了确认提示。
pip uninstall pip
pip uninstall pip
From this answer.
从这个答案。

