Linux (ubuntu) on python2 python3 coexist with environment, virtualenvwrapper after installation, the environmental variable is automatically set to VIRTUALENVWRAPPER_PYTHON = / usr / bin / python
The address points Python2 interpreter, is now changed to Python3 on it, as follows:
# Modify environment variables, reload
vim ~ / .bashrc
In .bashrc file, delete the original virtualenvwrapper configuration, and append the following
if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 source /usr/local/bin/virtualenvwrapper.sh fi
Reloading .bashrc
source ~/.bashrc
success!