https://askubuntu.com/questions/244641/how-to-set-up-and-use-a-virtual-python-environment-in-ubuntu
1. virtualenv安装
sudo apt-get install virtualenv
sudo apt install virtualenvwrapper
echo "source /usr/share/virtualenvwrapper/virtualenvwrapper.sh" >> ~/.bashrc
2. 配置 setup virtualenv & virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
mkdir $WORKON_HOME
echo "export WORKON_HOME=$WORKON_HOME" >> ~/.bashrc
echo "export PIP_VIRTUALENV_BASE=$WORKON_HOME" >> ~/.bashrc
source ~/.bashrc
3. 测试
mkvirtualenv flask # flask is the new env name, can be anything
> deactivate # deactivate current env
> workon flask # get into the env
> rmvirtualenv flask # remove