Focus on cloud service provider activities
Notes on website operation and maintenance

Linux CentOS Upgrading Python 3.6

Because the software environment requires a higher version of python, CentOS6 is 2.6 by default, CentOS7 is version 2.7. By the way, some netizens mentioned that Seafile cloud disk cannot be installed in CentOS6 One button package Because Python 2.7 is the minimum version by default. In this article, a software debugged by Lao Zuo requires Python 3 or above, so I'm going to install Python 3.6.

Note: It is recommended that users we are not familiar with should not install directly in the production environment. You can first install in the test environment to see if it is feasible.

First, install the prerequisite environment package

yum -y groupinstall development zlib zlib-devel

 Linux CentOS Upgrading Python 3.6 - Page 1

Second, download and Install python 3.6

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar xJf Python-3.6.0.tar.xz
cd Python-3.6.0
./configure
make
make install

 Linux CentOS Upgrading Python 3.6 - Page 2

Third, check whether it is successful

which python3
python3 -V

 Linux CentOS Upgrading Python 3.6 - Page 3

Fourth, create soft links

cd /usr/bin
mv python python.backup
ln -s /usr/local/bin/python3 /usr/bin/python

Then we restart the machine and see if the current python is 3.6

 Linux CentOS Upgrading Python 3.6 - Page 4

In this way, python can be upgraded and installed to version 3.6.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Linux CentOS Upgrading Python 3.6


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge