Download the installation package from the address https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz.
Since most Linux is python2.4, it is not necessary to install it.
Tar-xvzf python-3.5.2.tgz- -Decompression Compression pack
CD PYTHON-3.5.1/
./configure--prefix=/usr/python --Configuration path
Make
install- -perform installation
/usr/bin/python
[root@ocm1 python-3.5.2]# ls/usr/python/ --Newly installed version
bin include Lib share
[root@ocm1 python-3.5.2]# mv/usr/bin/python/usr/bin/python.2 --Remove the default version
[Root@ocm1 python-3.5.2]# ln-s/usr/python/bin/python3
python3 python3.5-config
python3.5 python3.5m python3-config
[root@ocm1 python-3.5.2]# ln-s/usr/python/bin/python3/ Usr/bin/python --Establish a connection let the default be set to version 3.5
[ROOT@OCM1 python-3.5.2]#
[root@ocm1 python-3.5.2]# python
Python 3.5.2 (default, OCT 2016, 19:30:18)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
on Linux Type "Help", "Cop Yright "," credits "or" license "for the more information.