At the beginning, this requirement was because when YaH3C was used to replace iNode for campus network authentication, it kept compiling errors, prompting that a certain module of Python could not be found. Baidu took a look. This module is only available in Python2.7 or higher, but the system The built-in Python is version 2.6, no wonder it has not been connected to the Internet. So, I continued to install Baidu and Google, and then there was a problem... I will start with a note here, right as a memo.
Check the version of python
Download Python-2.7.3
# wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
Unzip
Change working directory
installation
#. /configure
# make all
# make install
# make clean
# make distclean
View version information
Establish a soft connection to make the system default python point to python2.7
Recheck the Python version
8 After solving the system Python soft link pointing to the Python2.7 version, because yum is not compatible with Python 2.7, yum cannot work normally, we need to specify the Python version of yum
The file header
#! /usr/bin/python
Change to
#! /usr/bin/python2.6.6
http://www.zhangchun.org/the-centos6-3-upgrade-python-to-2-7-3-
This tutorial ends here, but I suddenly found that the input method icon was missing, and there was no candidate box for typing! iBus is broken! Search again, another version issue
iBus does not support Python2.7 either!
then. . .
Open the following two files with vi respectively, find the exec python line, change exec python to exec python2.6, save and exit. iBus is back to normal after restarting! Are you very happy?
Recommended Posts