virtualenvwrapper设置

时间:2013-03-23 19:52:48

标签: python virtualenv virtualenvwrapper

我使用sudo pip install virtualenvwrapper安装了virtualenvwrapper。但是,当我运行source bash_profile时,我收到此错误 - bash: /usr/local/share/python/virtualenvwrapper.sh:没有此类文件或目录

这就是我.bash_profile的样子:

export PATH=/usr/local/bin:/usr/local/sbin:${PATH}


export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/share/python/virtualenvwrapper.sh

我正在运行OSX Mountain Lion并使用此处提供的说明https://python-guide.readthedocs.org/en/latest/starting/install/osx/

安装了python

1 个答案:

答案 0 :(得分:0)

不要将绝对路径传递给source,而是使用动态路径:

source "$(which virtualenvwrapper.sh)"
相关问题