linux中python2.6升级2.7

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux中python2.6升级2.7相关的知识,希望对你有一定的参考价值。

查看版本

[[email protected] Python-2.7.8]# python
Python 2.6.6 (r266:84292, Aug 18 2016, 14:53:48) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

mv /usr/bin/python /usr/bin/python_old

ln -s /usr/local/python27/bin/python /usr/bin/

检查

[[email protected] Python-2.7.8]# python
Python 2.7.8 (default, Jan  3 2018, 20:47:59) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

以上是关于linux中python2.6升级2.7的主要内容,如果未能解决你的问题,请参考以下文章

Python2.6升级2.7

centos6默认python2.6升级2.7 卸载python2.6升级2.7

Python2.6 升级2.7

centos Python2.6 升级到2.7

python2.6升级2.7

python2.6 2.7 升级成3.6之后yum