wget
tar zxf Python-2.7.3.tgz cd Python-2.7.3 ./configure –prefix=/usr/local/python27 make make install ln -sf /usr/local/python27/bin/python2.7 /usr/local/bin/python2.7virtualenv --python=python2.7 --unzip-setuptools env
如果提示缺少zlib或者https,安装yum install zlib-devel openssl-devel 之后再重新编译python
yum install mysql-python
vi ~/.bash_profile
在最后添加 export PYTHONPATH=/usr/lib/python2.5/site-packages/
重新登陆即可生效,只对登陆用户生效
配置 pip 源
[global]
trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple/