将pip改成豆瓣源
1。新建~/.pip/pip.conf
[global]
index-url = https://pypi.doubanio.com/simple
sudo pip install virtualenv
mkdir ~/envs
#创建名为myvenvs的虚拟环境
virtualenv ~/envs/myvenvs
cd ~/envs/myvenvs
#激活虚拟环境
source bin/activate
#安装web框架
pip install pyramid
pip install flask
pip install django
deactivate #退出虚拟环境