1. Initially CentOS may be missing components such as GCC, install components first
" Development Tools "
2. Download the source code, unzip and enter the directory
# https://www.python.org # Unzip tar xvjf * * *. TAR.XZ# into the catalog CD python-3.5*
3. Install Python
# Create directory mkdir/usr/python3.5# Run configuration specifies that you want to install to the/usr/python3.5 directory ./configure--prefix=/usr/ python3.5# build make# installation make install
4. Create a Python3.5 soft connection
* * in/usr/bin python, Python2, python2.7 Three files point to the latter (that is, all python2.7.5)
* * It is not recommended that the default Python be modified to point to version 3.5 in accordance with other online methods, so the firewall firewall will not be available, and there may be other effects
* * It is recommended to create an additional python3 soft connection
cd/usr/Bin
# Create a python3.5 version of the Soft connect ln-s/usr/python3.5/bin/python3/usr/bin/python3
#查看python版本
Python3-v
CentOS installation python3.5