Turn from: http://www.linuxidc.com/Linux/2016-04/129784.htm
Key points:
1. Installation may need to rely on: Yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
2. Download python3.5.1 's tar packets from the Python official web: wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
3. Extract the tar packets into the/usr/local directory: TAR-ZXVF python-3.5.1.tgz/usr/local/
4. Install the python3.5.1 source package: Execute the command in the/usr/local/python3.5.1 directory (you need to ensure that the GCC command is installed, and if the GCC command is not installed, you can perform yum install gcc to install the GCC command):./ Configure--->make---->make Install
5. Replace the original python2.7 soft connection, when you enter Python at the command line, the default boot python3.5.1:
Rm-rf/usr/bin/python
Ln-s/usr/local/bin/python3.5/usr/bin/python
6. Enter Python at the command line to see if it started python3.5.1