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
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
Third, check whether it is successful
which python3
python3 -V
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
In this way, python can be upgraded and installed to version 3.6.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge