venv Python使用不正确的sys.prefix
发布时间:2020-12-16 21:36:41 所属栏目:Python 来源:网络整理
导读:我在mac Mountain Lion上运行canopy 64 bit版本:1.0.3.1262.我已经使用easy_install安装了virtualenv.但是在我尝试执行命令时: virtualenv venv --distribute 它显示以下错误: Using base prefix '/Applications/Canopy.app/appdata/canopy-1.0.3.1262.ma
我在mac Mountain Lion上运行canopy 64 bit版本:1.0.3.1262.我已经使用easy_install安装了virtualenv.但是在我尝试执行命令时:
virtualenv venv --distribute 它显示以下错误: Using base prefix '/Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents' New python executable in venv/bin/python dyld: Library not loaded: @rpath/Python Referenced from: /Users/xxx/Desktop/untitled folder 2/venv/bin/python Reason: image not found ERROR: The executable venv/bin/python is not functioning ERROR: It thinks sys.prefix is u'/Users/xxx/Desktop/untitled folder 2' (should be u'/Users/xxx/Desktop/untitled folder 2/venv') ERROR: virtualenv is not compatible with this system or executable 有没有人有类似的问题并解决了它?提前感谢您提出宝贵意见. 解决方法
Canopy使用venv而不是virtualenv
尝试设置您的环境,如下所示: venv -s path/to/virtual_environment_dir 取自:https://support.enthought.com/entries/21802240-Use-venv-not-virtualenv-with-Canopy-Python 或者如果要设置没有系统站点包的环境:Setting up a virtural enviroment (venv) with no system site packages (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |