【发布时间】:2012-09-15 17:24:19
【问题描述】:
我正在尝试使用运行 Mountain Lion 的 OSX 安装 Python2.7 运行 cython,但出现以下错误:
Traceback (most recent call last):
File "/usr/local/bin/cython", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: Cython==0.17
我该如何解决这个问题?
谢谢!
【问题讨论】:
-
...你
easy_install cython了吗? -
注意路径名。看起来
/usr/local/bin/cython正在尝试使用python2.6。这有点远,但试试这个:python2.7 /usr/local/bin/cython