How to Upgrade to Python 3.6 on Linux CentOS

Because the software environment requires a higher version of Python, CentOS6 defaults to version 2.6 and CentOS7 defaults to version 2.7. It’s also worth mentioning that some users have noted the reason why the Seafile cloud drive one-click package cannot be installed on CentOS6: it requires at least Python 2.7 by default. In addition, one piece of software that Lao Zuo was debugging in this article requires Python 3 or above, so I decided to install Python
3.6.

Note: If you are not very familiar with this, it is recommended not to install it directly in a production environment. You can first try installing it in a test environment to see whether it works.

First, install the required environment packages

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 was successful

which python3
python3 -V

Fourth, create a symbolic link

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

Then restart the machine and check whether the current Python is 3.6

This allows Python to be upgraded and installed to version 3.6.

Leave a Comment

Your email address will not be published. Required fields are marked *

中文 EN
🚀

RedGate VPN

免费节点太挤太慢?
升级高速稳定专线

立即体验 →

告别卡顿

RedGate VPN
全球高速节点

免费下载 →
Scroll to Top