按照以下说明进行操作后道格·海尔曼的virtualenvwrapper post https://doughellmann.com/posts/virtualenvwrapper/,我仍然无法启动测试环境。
[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$
应该注意的是,我正在使用WORKON_HOME
那不在我的$HOME
。我尝试寻找/usr/local/bin/virtualenvwrapper.sh
如图所示virtualenvwrapper安装文档 http://virtualenvwrapper.readthedocs.org/en/latest/install.html,但它不存在。
我正在运行 CentOS 6 和 python 2.6.6,如果这很重要的话。
# File: ~/.bash_profile
# ...
export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"
解决方案1:
因为某些原因,virtualenvwrapper.sh
安装在/usr/bin/virtualenvwrapper.sh
,而不是在/usr/local/bin
.
以下内容在我的.bash_profile
作品...
source "/usr/bin/virtualenvwrapper.sh"
export WORKON_HOME="/opt/virtual_env/"
我的安装似乎在没有来源的情况下运行良好virtualenvwrapper_bashrc
解决方案2:
或者,如下所述,您可以利用以下机会:virtualenvwrapper.sh
已经在你的 shell 中了PATH
只需发出一个source `which virtualenvwrapper.sh`
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)