Installation of python3.6 may use dependencies
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
Download python3.6 Compilation Installation
Download https://www.python.org on the Python website
To download the latest version of the source code, use make Altinstall, if you use makes install, there will be two different versions of Python in the system in the/usr/bin/directory. This will lead to a lot of problems and is not easy to handle.
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xzxz -d Python-3.7.0.tgz.xztar -xvf Python-3.7.0.tgzcd Python-3.7.0
Installing the Python3.6 into the/usr/local directory
./configure --prefix=/usr/localmakemake altinstall
Error handling:
Execution file for python3.6 program:/usr/local/bin/python3.6
python3.6 application directory:/usr/local/lib/python3.6
PIP3 execution File:/usr/local/bin/pip3.6
Pyenv3 execution File:/usr/local/bin/pyenv-3.6
Change/usr/bin/python Link
cd/usr/binln -s /usr/local/bin/python3.6 /usr/bin/python3ln -s /usr/local/bin/pip3.6 /usr/bin/pip3
Centos Python3 Installation Coexistence