Centos 6.4 python 2.6 upgrade to 2.7

1、 CentOS installs Python dependencies

yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Check the version of python

python  -V

Python 2.6.6

  1. Download Python-2.7.3

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

  1. Unzip

tar -jxvf Python-2.7.3.tar.bz2

  1. Change working directory

cd Python-2.7.3

  1. installation
    #. /configure

make all

make install

make clean

make distclean

  1. View version information

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

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

mv /usr/bin/python /usr/bin/python2.6.6

ln -s /usr/local/bin/python2.7 /usr/bin/python

  1. Recheck the Python version

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

vi /usr/bin/yum

The file header
#! /usr/bin/python

Change to
#! /usr/bin/python2.6.6

Author: front-line career
Source: CSDN
Original: https://blog.csdn.net/jcjc918/article/details/11022345
Copyright statement: This article is the original article of the blogger, please attach the link to the blog post if you reprint it!

( adsbygoogle = window.adsbygoogle || []).push({});

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
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 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
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)
How to comment python code
centos7 install python3 and ipython
Python code to find bugs(4)
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)
How to use python tuples
CentOS 6 compile and install python 3
centos6.5: gcc upgrade (5.2.0) process record