升级到Mac OS X 10.8(Mountain Lion)并在尝试呼叫时出现以下错误$ pip:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pip==1.1
Run Code Online (Sandbox Code Playgroud)
更新:尝试通过再次执行安装过程重新安装(使用http://www.pip-installer.org/en/latest/installing.html#using-the-installer和easy_install),但是没有工作,得到了相同的错误.
现在尝试以下内容:调用$ sudo pip和上述错误消失.奇怪的是,在上面的错误消息中找不到的目录指向/ System/Library/...而python安装是(new?)在/ Library/Frameworks/..中查找:
$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
Run Code Online (Sandbox Code Playgroud)
任何想法如何摆脱sudo?