View the current default Python version
whereis python
Installation of python3.6 may use dependencies
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
EPEL is a software source for Yum, which contains a lot of software that is not available in the basic source, but it is necessary to install it when we use EPEL, EPEL,
sudo yum -y install epel-release
Install PIP
sudo yum install python-pip
Update pip
sudo pip install --upgrade pip
View System Information for CentOS
Installing wget
sudo yum -y install wget
Download python3.6
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
Unzip the tgz bag
tar -zxvf Python-3.6.5.tgz
Move Python below the/usr/local.
View Python version
ls /usr/bin | grep python
Remove old versions of Python dependencies
Go to Python directory
Configuration
sudo ./configure
Compile
sudo make
Compile, install
sudo make install
Delete old soft links
Create a new soft link to the latest Python
View current Python version
python
CentOS Installation Python