下载源码包解压缩 指定目录安装
2.安装 zlib-devel######否则安装setuptools的时候会报错
yum -y install zlib-devel sqlite-devel # django开发时用
./configure --prefix=/export/servers/python
make && make install
3.ln -s /export/servers/python/bin/python /usr/local/sbin/python
4. vim /usr/bin/yum ,修改yum的运行版本为:/usr/bin/python2.6 ,否则yum无法启用
5.下载setuptools 源码,解压进入目录,然后运行
python setup.py build
python setup.py install
转载于:https://blog.51cto.com/feifie/1597847