如何让virtualenv使用Enthought Python Distribution生成正确的Python执行文件及sys.path?
我在Mac上安装了Enthought Python Distribution 7.0,然后用easy_install安装了pip,接着用pip安装了virtualenv。当我尝试创建一个虚拟环境时,出现了:
> virtualenv test
New python executable in test/bin/python
ERROR: The executable test/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Library/Frameworks/EPD64.framework/Versions/7.0' (should be '/Users/anand/test')
ERROR: virtualenv is not compatible with this system or executable`
而且test/bin里没有任何激活脚本。我该怎么让virtualenv正常工作呢?
谢谢大家的帮助!
1 个回答
6
这个问题在EPD开发者的邮件列表上讨论过。有人提到,EPD在设计时并没有考虑到虚拟环境(virtualenv),所以有时候会出现一些问题。不过,有人分享了一个总结好的解决方案的链接,我现在也在试这个方法:https://gist.github.com/845545
希望对你有帮助,
Michael