当我试图使用命令virtualenv venv
从终端用Python创建一个虚拟的环境中,我得到了以下错误:`使dyld:图书馆不是loaded`错误,导致的virtualenv加载
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
我不是第一个人遇到类似的错误 - 我尝试以下this answer's建议,并运行:
gfind ~/.virtualenvs/my-virtual-env/ -type l -xtype l -delete
没有帮助。也没有运行sudo virtualenv venv
作为超级用户运行commmand。
接下来应该调查什么?
@ Dave2e明白了,谢谢你的指点,因为我是新来的StackOverflow。事情发生的同时,我也遇到了这个问题的实际答案。所以,我编辑了我的原始非答案,并用此替换了它。 – user1764447