发布时间:2019-08-19 09:22:29编辑:auto阅读(2004)
将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模块
48885
47962
38735
35875
30300
27064
26084
20919
20728
19090
552°
632°
637°
642°
613°
593°
666°
734°
857°
983°