【发布时间】:2015-07-01 01:31:33
【问题描述】:
我在让 virtualenv 工作方面遇到了很多麻烦。
首先我通过 pip 安装它,然后尝试设置 virtualenv。那没用,我收到以下错误消息:
ResNets-iMac:desktop zachary$ virtualenv anothertest
Using base prefix '/Applications/Canopy.app/appdata/canopy-1.5.1.2730.macosx-x86_64/Canopy.app/Contents'
New python executable in anothertest/bin/python
dyld: Library not loaded: @rpath/Python
Referenced from: /Users/zachary/Desktop/anothertest/bin/python
Reason: image not found
ERROR: The executable anothertest/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/Users/zachary/Desktop' (should be u'/Users/zachary/Desktop/anothertest')
ERROR: virtualenv is not compatible with this system or executable
然后,我几乎完成了所有我能解决的问题,并确定 Canopy 是问题所在。所以我删除了它,重新安装了virualenv(通过'pip uninstall virtualenv'然后'pip install virtualenv')现在每当我尝试做任何涉及virtualenv的事情时都会收到这个错误:
dyld: Library not loaded: @rpath/Python
Referenced from: /Users/zachary/Library/Enthought/Canopy_64bit/User/bin/python
Reason: image not found
我不知道该怎么做,当我检查我的默认 python 版本是什么时,我得到:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
我对这一切都很陌生,我真的不知道我在做什么或如何解决这个问题,因此非常感谢任何帮助。
谢谢!
【问题讨论】:
标签: python macos python-2.7 virtualenv virtualenvwrapper