centos7安装pip
安装pip
yum -y install epel-release
yum -y install python2-pip
安装virtualenvwrapper
pip install virtualenvwrapper
启动virtualenvwrapper
source /usr/bin/virtualenvwrapper.sh
自启动virtualenvwrapper
vim ~/.bashrc,添加如下代码
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/bin/virtualenvwrapper.sh
创建python27环境
mkvirtualenv env27
yum安装python36
yum -y install python36
创建python36环境
mkvirtualenv -p python36 env36
启动虚拟环境
workon env27/env36
退出虚拟环境
deactivate
删除虚拟环境
rmvirtualenv env27/env36