简体   繁体   English

如何使用Enthought Python Distribution让virtualenv使用正确的sys.path生成Python可执行文件?

[英]How can I get virtualenv to produce Python executables with the correct sys.path using the Enthought Python Distribution?

I installed the Enthought Python Distribution version 7.0 on a Mac, then easy_installed pip, then did pip install virtualenv. 我在Mac上安装了Enthought Python Distribution版本7.0,然后在easy_installed pip上安装了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. 和test / bin不包含任何激活脚本。 How can I get virtualenv working? 我怎样才能让virtualenv工作?

Thanks for any help! 谢谢你的帮助!

This question was discussed on the EPD developers mailing list. 这个问题在EPD开发者邮件列表中进行了讨论。 Among others it was mentioned that EPD was not put together with virtualenv in mind and that it has it's bugs sometimes. 除其他外,有人提到EPD并没有考虑到virtualenv,并且它有时会出现错误。 However, somebody posted a link to a summarized solution which I'm trying out myself now: https://gist.github.com/845545 但是,有人发布了一个链接到我现在正在尝试的摘要解决方案: https//gist.github.com/845545

HTH, Michael HTH,迈克尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM