#python -V
Python 2.6.6
1.下载Python-2.7.3
#wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
#tar -jxvf Python-2.7.3.tar.bz2
#cd Python-2.7.3
#./configure && make all && make install && make clean && make distclean
#/usr/local/bin/python2.7 -V
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python
#查看版本
python -V
#vi /usr/bin/yum
将文件头部的
#!/usr/bin/python
改成
#!/usr/bin/python2.6.6
安装setuptools
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
#安装pip程序
wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
注意:wget获取https的时候要加上:--no-check-certificate
tar zvxf 1.5.5.tar.gz #解压文件
cd pip-1.5.5/
python setup.py install