山狮开发者预览2中的virtualenv问题

时间:2012-03-20 05:51:47

标签: python django virtualenv osx-mountain-lion

所以我刚刚更新到Mountain Lion开发人员预览版2,突然间我的python开发环境几乎被拍摄了。在尝试创建一个新的virtualenv时,我得到以下内容:

jcroft@MacBook-Pro:~/Development/Python/_VirtualEnvs$ virtualenv test
New python executable in test/bin/python
ERROR: The executable test/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/System/Library/Frameworks/Python.framework/Versions/2.7' (should be u'/Users/jcroft/Development/Python/_VirtualEnvs/test')
ERROR: virtualenv is not compatible with this system or executable

任何线索?提前谢谢!

1 个答案:

答案 0 :(得分:0)

您需要确保将/usr/local/share/python添加到PATH,否则它仍会尝试使用Apple安装的easy_install。

此处有更多信息:https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python