关于简易安装:如何使用easy_install彻底删除已安装的pip?

How to cleanly remove pip that is installed by using easy_install?

如果我在我的OS X Lion 10.7.4上使用了sudo easy_install pip,我该如何清除它?安装之后,我也做了pip install --upgrade setuptools

以下是输出:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
mac:~ usr$ sudo easy_install pip
Password:
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.4  
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb
Processing pip-1.5.4.tar.gz
Running pip-1.5.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-b_hfrF/pip-1.5.4/egg-dist-tmp-o0r8F5
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.4 to easy-install.pth file  
Installing pip script to /usr/local/bin    
Installing pip2.7 script to /usr/local/bin  
Installing pip2 script to /usr/local/bin    

Installed /Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

当我执行EDOCX1[2]时,pip(通过easy-install安装)会导致symlink问题,它将自己的pip安装到/usr/local/bin,如下所示:

1
2
3
lrwxr-xr-x  1 usr  admin   30  3  3 23:26 pip -> ../Cellar/python/2.7.6/bin/pip
lrwxr-xr-x  1 usr  admin   31  3  3 23:26 pip2 -> ../Cellar/python/2.7.6/bin/pip2
lrwxr-xr-x  1 usr  admin   33  3  3 23:26 pip2.7 -> ../Cellar/python/2.7.6/bin/pip2.7

我知道我可以使用brew link --overwrite python,但我不喜欢简单安装的pip在我的系统中,如果我不使用它。我宁愿保持我的系统清洁。

有人能给我解释一下这些警告是为了什么吗?我知道他们不会伤害我,但我很好奇我是否会失去任何依赖?

谢谢。


使用pip卸载pip:

1
sudo pip uninstall pip


从这个链接:

1
easy_install -mxN <PackageName>

也就是说,执行:

1
easy_install -mxN pip

然后,可以手动删除.egg文件或目录,这些文件或目录应该位于.../Python/2.7/site-packages/[PACKAGE].egg中的某个位置。

但我没试过。我甚至不使用Mac:)

您还可以看到类似的问题:如何删除用python的easy-install安装的包?