标签:md5 pypi 版本 source figure setup ref pre python版本
一、 升级python到2.7.3
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -zxvf Python-2.7.3.tgz
cd Python-2.7.3
mkdir /usr/local/python27
./configure --prefix=/usr/local/python27
make
make install
mv /usr/bin/python /usr/bin/python2.6
ln -s /usr/local/python27/bin/python2.7 /usr/bin/python
以上步骤完成后,输入python应该会显示2.7.3版本了
二、升级完python后,yum居然用不了了- -!需要如下修改
vim /usr/bin/yum
把#!/usr/bin/python改成 #!/usr/bin/python2.6 也就是让yum还是用老版本的python.
三、安装pip
1.先要安装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
2.安装pip
wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
tar -zxvf pip-1.5.4.tar.gz
cd pip-1.5.4
python setup.py install
【python】python版本升级2.6.6到2.7.3(CentOS release 6.2)
标签:md5 pypi 版本 source figure setup ref pre python版本
原文地址:http://www.cnblogs.com/dplearning/p/7418329.html