First, the foregoing
Python3 used in the company or more, but the general Centoos default is Python2 environment. So this article on the installation of Python3 to make a summary.
Second, the specific
1. View Python version python command
2. Install Python's dependency package
Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel Libpcap-devel Xz-devel
3. Download the installation package
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
4, unzip and enter the decompression directory after the installation
TAR-XF python-3.5.0.tgz
CD Python-3.5.0
./configure--prefix=/usr/local/python3
Make && make install
5. Create a soft connection
Ln-s/usr/local/python3/bin/python3/usr/bin/python3
Ln-s/USR/LOCAL/PYTHON3/BIN/PIP3/USR/BIN/PIP3
6. Test input Python3
This installation is successful!!
"Python article"---Python3.5 installation tutorial in Centoos-ultra-practical