发布时间:2019-08-19 09:22:29编辑:auto阅读(2002)
将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
上一篇: python: 爬虫利器requests
下一篇: Python学习笔记5—Python模块
48876
47941
38721
35864
30288
27044
26075
20911
20714
19076
512°
612°
614°
618°
594°
579°
645°
718°
836°
939°