problems with python and virtualenvwrapper after updating: No module named virtualenvwrapper

谁都会走 提交于 2019-11-28 05:00:59

You need to install them under python 2.7.9 by specifying the path to correct version of pip to be used

/usr/local/bin/pip install virtualenv virtualenvwrapper

otherwise, when running pip install the sytem will use the default one (i.e. the one located at /usr/bin/pip)

If you have modified your virtualenvwrapper to point to python3, like I do:

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3

then make sure you install the virtualenv and virtualenvwrapper using:

sudo /usr/local/bin/pip3 install virtualenv virtualenvwrapper

source /usr/local/bin/virtualenvwrapper_lazy.sh


when use pyenv:

export PYENV_ROOT="${HOME}/.pyenv"

if [ -d "${PYENV_ROOT}" ]; then
    export PATH="${PYENV_ROOT}/bin:${PATH}"
    eval "$(pyenv init -)"
fi
export PATH

export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
#important
source /usr/local/bin/virtualenvwrapper_lazy.sh
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!