我对Linux,python和有关此问题的所有事物都是新手。我用pip安装了virtualenvwrapper,我得到了:
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /usr/local/lib/python2.7/dist-packages (from stevedore->virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/lib/python2.7/dist-packages (from stevedore->virtualenvwrapper)
我将下一行添加到我的bashrc文件中
export WORKON_HOME=~/virtualenvs
export VIRTUALENVWRAPPER_HOOK_DIR=$WORKON_HOME/hooks
source /usr/local/bin/virtualenvwrapper.sh
编辑后,我重新启动了终端并尝试使用mkvirtual env创建我的虚拟环境,但出现此错误:
mkvirtualenv:命令未找到
寻找我阅读的答案,我应该运行哪个virtualenvwrapper命令来知道它的安装位置。我做到了,但一无所获。
请,您能帮我吗?我无法继续,我确实需要这样做。
我发现的答案仅是关于我必须添加到bashrc文件中以解决问题的行。
非常感谢
mkvirtualenv
不在您的PATH
当我尝试启动虚拟环境时。将以下脚本添加到我的.zshrc
文件中很有帮助。
VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper_lazy.sh