Centos 6.4 python 2.6 upgrade to 2.7

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

  1. python  -V     Python 2.6.6

  2. Download Python-2.7.3

# wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
  1. Unzip

  2. tar -jxvf Python-2.7.3.tar.bz2

  3. Change working directory

  4. cd Python-2.7.3

  5. installation

#. /configure  
# make all             
# make install  
# make clean  
# make distclean
  1. View version information

  2. /usr/local/bin/python2.7 -V

  3. Establish a soft connection to make the system default python point to python2.7

  4. mv /usr/bin/python /usr/bin/python2.6.6   #ln -s /usr/local/bin/python2.7 /usr/bin/python

  5. Recheck the Python version

  6. python -V

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

  1. vi /usr/bin/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. . .

  1. Configure iBus

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?

  1. vi /usr/bin/ibus-setup

  2. vi/usr/libexec/ibus-ui-gtk

Recommended Posts

Centos 6.4 python 2.6 upgrade to 2.7
Centos 6.4 python 2.6 upgrade to 2.7
Centos default python2.6 upgrade to
CentOS upgrade python2 to pyth
CentOS7 upgrade python3
Centos6.7 comes with python upgrade to
CentOS6.5 upgrade kernel to 3.10.28
CentOS + Python3.6+
Centos 7.5 python3.6
How to upgrade CentOS7 to CentOS8 (detailed steps)
How to install Python 3.8 on CentOS 8
How to install Python on CentOS 8
CentOS7 repairs python to save yum
Centos6 install Python2.7.13
Ubuntu16 upgrade Python3
Centos7 install Python 3.6.
CentOS install Python 3.6
Python - centos6 installation
Centos7 install Python2.7
01. Introduction to Python
Centos6.5 openssh upgrade
Centos install Python3
Centos7 upgrade kernel
CentOS6.8 install python2.7
centos6.9 rabbitmq 3.6.8 upgrade 3.8.2
Introduction to Python
ubuntu16.04 upgrade python2
Centos python3 compile installation and compile gcc upgrade
R&D: How To Install Python 3 on CentOS 7
How to upgrade all Python libraries on Ubuntu 18.04
CentOS7.5-1804 system kernel upgrade
How to upgrade to Ubuntu 20.04
Centos source installation Python3
Centos kernel version upgrade
CentOS 5 to CentOS 5.8 YUM source
CentOS Python Java installations
How to upgrade to Ubuntu 20.04
The specific steps to upgrade python on Raspberry Pi
Solution to python alignment error
Python code to find bugs (2)
Python code to find bugs(7)
How to comment python code
centos7 install python3 and ipython
Python code to find bugs (3)
Python code to find bugs(9)
Centos7.6 method to install Tomcat-8.5.39
Upgrade Ubuntu 18.04 on Azure to 18.10
How to learn python quickly
How to uninstall python plugin
Centos 6.10 reinstall python and yum
Introduction to Python related modules
ububtu10.04, 11.10 online upgrade to ubuntu12.04LTS
CentOS7 install python3 and pip3
Python code to find bugs(6)
CentOS 6.9 compile and install python
Python code to find bugs (1)
Python code to find bugs(8)
3 ways to encrypt Python files
Centos6 install python3 pip3 ipython3
How to understand python objects
Python code to find bugs(5)