当我尝试在终端中使用命令
virtualenv venv
创建一个Python虚拟环境时,出现了以下错误:Using base prefix '/Users/zacharythomas/anaconda3'
New python executable in /Users/zacharythomas/venv/bin/python
dyld: Library not loaded: @rpath/libpython3.6m.dylib
Referenced from: /Users/zacharythomas/venv/bin/python
Reason: image not found
ERROR: The executable /Users/zacharythomas/venv/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/zacharythomas' (should be '/Users/zacharythomas/venv')
ERROR: virtualenv is not compatible with this system or executable
我不是第一个遇到类似错误的人 -- 我尝试按照这个答案的建议运行:
gfind ~/.virtualenvs/my-virtual-env/ -type l -xtype l -delete
那并没有帮助。以超级用户身份运行命令sudo virtualenv venv
也没有用。
接下来我应该调查什么?