我有一臺運行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