Each time you install Python 3 on CentOS, you need to re-check the data, this time simply write down your notes.
First install GCC
Yum-y Install GCC
Yum Install Zlib-devel
./configure--prefix=/usr/local
Make
Make Altinstall
Create a soft link
Cd/usr/bin
MV Python Python.backup
Ln-s/usr/local/bin/python3.6/usr/bin/python
Ln-s/usr/local/bin/python3.6/usr/bin/python3
In fact, the installation is completed in Python 3, but if we use the PIP installation Framework, we may install to the Python 2.7 directory,
Change the python dependency of the Yum script (it is not known whether the apt tool under Ubuntu relies on Python, but Yum under CentOS does need to rely on Python)
# Cd/usr/bin
# ls yum*
Yum Yum-config-manager Yum-debug-restore Yum-groups-manager
YUM-BUILDDEP Yum-debug-dump Yumdownloader
Change the above file header to
#!/usr/bin/python Change to #!/usr/bin/python2
Installing Python 3.6 notes under CentOS 7