Upgrade Python 6.4 to 2.6 in CentOS 2.7
At first, I had this requirement because I had a compilation error in CentOS 6.4 When I used YaH3C to replace iNode for campus network authentication. I was prompted that I could not find a Python module. Baidu had a try, this module is available only in Python2.7 and later versions, but the Python version 2.6 is included in the system. It is no wonder that this module has never been connected to the Internet. So I continued to install Baidu and google, and then encountered a problem... I will record it at the beginning here, so I can forget it.
View python version
# Python-V
Python 2.6.6
1. Download the Python-2.7.3
# Wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
2. Extract
# Tar-jxvf Python-2.7.3.tar.bz2
3. Change the working directory
# Cd Python-2.7.3
4. Installation
#./Configure
# Make all
# Make install
# Make clean
# Make distclean
5. View version information
#/Usr/local/bin/python2.7-V
6. Establish a soft connection to point python to python2.7 by default.
# Mv/usr/bin/python/usr/bin/python2.6.6
# Ln-s/usr/local/bin/python2.7/usr/bin/python
7. Verify the Python version again.
# Python-V
8 solve the problem that the system Python soft link points to Python 2.7, because yum is incompatible with Python, so yum cannot work normally, we need to specify the Python version of yum
# Vi/usr/bin/yum
Place
#! /Usr/bin/python
Change
#! /Usr/bin/python2.6.6
But soon I suddenly found that the input method icon was missing and there was no candidate box for typing! IBus collapsed! Search again, and the version is crazy. iBus does not support Python2.7!
So...
9. Configure iBus
Use vi to open the following two files, find the exec python line, change exec python to exec python2.6, save, and exit. After the restart, iBus returns to normal! Are you happy?
# Vi/usr/bin/ibus-setup
# Vi/usr/libexec/ibus-ui-gtk
-------------------------------------- Split line --------------------------------------
Install Python3.4 on CentOS source code
Python core programming version 2. (Wesley J. Chun). [Chinese version of hd pdf]
Python development technology details. (Zhou Wei, Zong Jie). [hd PDF scan version + book guide video + code]
Obtain Linux information using a Python script
Build a desktop algorithm transaction research environment using Python in Ubuntu
A Brief History of Python Development
Python details: click here
Python: click here
This article permanently updates the link address: