linux自带python2,手动安装python3,sudo apt-get install python3.5
下载pip,安装到python2
使用easy_install 安装pip;sudo python3 -m easy_install pip
pip install virtualenv和pip install virutalenvwrapper
编辑.bashrc文件 :export WORKON_HOME=~/workspace source /usr/bin/virtualenvwrapper.sh或source /usr/local/bin/virtualenvwrapper.sh
执行命令source .bashrc
mkvirtualenv 名字 -p python3 (指定任意python解释器)
workon name
deactive
转载于:https://blog.51cto.com/11732546/2049337