Python 2.6.6升级到Pytho
将python 2.6.6升级到Python 2.7.3:
1. 下载Python 2.7.3:
wget Http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
2. 安装
# tar -jxvf Python-2.7.3.tar.bz2
# cd Python-2.7.3
# ./configure
# make install
3. 查看版本信息
# /usr/local/bin/python2.7 -V
4. 建立软链接
# mv /usr/bin/python /usr/bin/python2.6.6
# ln -s /usr/local/bin/python2.7 /usr/bin/python
5. 重新检验python
[root@python ~]# python -V
Python 2.7.3
[root@python ~]#
6. 解决升级python后yum无法使用的问题(yum不兼容python2.7)
修改/usr/bin/yum文件,将第一行的/usr/bin/python替换为/usr/bin/python2.6.6
相关文章