我有一台运行Python 2.6的Mac。当我尝试使用easy_install
我得到这个消息:为什么Python easy_install无法在我的Mac上运行?
/usr/bin/easy_install-2.6:7: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
from pkg_resources import load_entry_point
/usr/bin/easy_install-2.6:7: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
from pkg_resources import load_entry_point
Traceback (most recent call last):
File "/usr/bin/easy_install-2.6", line 10, in <module>
load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point
return False
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2173, in load_entry_point
deps = []
ImportError: Entry point ('console_scripts', 'easy_install') not found
我为此很困惑,我想知道我怎么能解决这个问题。以前,我没有收到此消息,然后在安装pip
并卸载后,easy_install不再有效。我想知道如何解决这个问题,或者在Mac上恢复默认的Python或easy_install设置。
如果您使用[自制](http://mxcl.github.com/homebrew/),你可以做'须藤酿造安装distribute' – 2012-02-12 00:28:21
@DanaWoodman这不是有效的自制配方。 – Wylie 2012-03-09 04:19:32
现在'distribute'现在带有python配方,但是脚本放在'/ usr/local/share/python /'中,因此你可能会在/ usr/local/bin中找到一个旧版本的easy_install符号链接'。请参阅:https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python – 2012-05-11 12:15:58