Ubuntu 18.04 only comes with python3.6.5, so I don't want to install python2, but when I installed virtualenvwrapper through apt install, I found that python2 must be installed, so cleanliness prompted me to install it through pip, and then I got the same error as the title.
Install virtualenvwrapper:
# pip 装这俩
pip3 install virtualenv virtualenvwrapper
# .bashrc补缀
vim ~/.bashrc
# 在末尾添上(去掉注释)
# export WORKON_HOME=$HOME/.virtualenvs
# export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
# source /usr/local/bin/virtualenvwrapper.sh
However, there is an unseen error:
bash: /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh: 没有那个文件或目录
bash: /usr/local/bin/virtualenvwrapper.sh: 没有那个文件或目录
solve:
It is found that since Ubuntu17.04, the virtualenvwrapper.sh obtained by installing virtualenvwrapper through pip at the user level is installed in the ~/.local/bin/
directory, so the path in the previous .bashrc can be corrected.