如何使用 Enthought Python 发行版让 virtualenv 生成具有正确 sys.path 的 Python 可执行文件?
我在 Mac 上安装了 Enthought Python Distribution 7.0 版,然后是 easy_installed pip,然后是 pip install 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 工作?
感谢您的帮助!
I installed the Enthought Python Distribution version 7.0 on a Mac, then easy_installed pip, then did pip install virtualenv. When I try to create a virtual environment, I get:
> 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`
and test/bin does not contain any activate script. How can I get virtualenv working?
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题在 EPD 开发者邮件列表上进行了讨论。
其中有人提到,EPD 并没有考虑到与 virtualenv 放在一起,而且它有时会存在错误。
然而,有人发布了一个总结解决方案的链接,我现在正在尝试自己:
https://gist.github.com/845545
HTH,
迈克尔
This question was discussed on the EPD developers mailing list.
Among others it was mentioned that EPD was not put together with virtualenv in mind and that it has it's bugs sometimes.
However, somebody posted a link to a summarized solution which I'm trying out myself now:
https://gist.github.com/845545
HTH,
Michael