Ubuntu16.04 默認安裝了python3,須要安裝pippython
apt-get install python-pip pip install pip -U
更改pip源windows
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install virtualenv
pip install virtualenvwrapper
pip install virtualenvwrapper-win
mkdir $HOME/.venv
export WORKON_HOME=$HOME/.venv source $HOME/.local/bin/virtualenvwrapper.sh
source ~/.bashrc
mkvirtualenv -p /usr/bin/python3.x mycode
workon mycode
deactivate
rmvirtualenv mycode