1, the previous version of python view, ctrl + z quit, what operations are performed as root or sudo user
2, the installation of the dependent packages python3.6
yum -y groupinstall "Development tools"
3, install additional dependencies
yum -y install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
4, python3.6 Download
If you install other versions, can be downloaded directly Quguan network
5, create a folder
mkdir /usr/local/python3
6, extract the installation package python3.6
takes -xzjf Python 3.6.4.tar.xz
7, set the installation path
cd Python-3.6.4
./configure --prefix=/usr/local/python3
8, compile and install python
If you encounter problems when compiling, Baidu, can find
make && make install
9, flexible connection is provided to the / usr / bin directory
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
At this point the installation is successful