转自:http://www.jb51.cc/article/p-sklmgice-ee.html
1.下载Pyhon,选择下载Gzipped source tar ball (2.7.6) (sig)
网址https://www.python.org/download/releases/2.7.6
2.解压安装,命令如下
tar -xvf Python-2.7.6.tgz
cd Python-2.7.6
./configure –prefix=/usr/local/python2.7
make
make install
3.创建链接来使系统默认python变为python2.7
ln -fs /usr/local/python2.7/bin/python2.7 /usr/bin/python
4.查看Python版本
python –V
5.修改yum配置(否则yum无法正常运行)
vi /usr/bin/yum
将第一行的#!/usr/bin/python修改为系统原有的python版本地址#!/usr/bin/python2.6
至此CentOS6.3系统Python已成功升级至2.7.6版本
参考:
http://www.centoscn.com/image-text/config/2015/0325/5005.html
http://www.cnblogs.com/dudu/p/4294238.html