我刚刚将我的 OS X 从 10.7 更新到 10.8(山狮)。当我尝试运行 virtualenv venv --distribute 时出现此错误
File "/usr/local/bin/virtualenv", 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: virtualenv==1.8.2
当我运行 which python 我得到 /usr/bin/python 当我运行 which virtualenv 我得到 /usr/local/bin/virtualenv
似乎路径随着升级而改变,有人知道如何修复它吗?
谢谢