The detailed installation process is as follows:
Installation dependent environment
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc libffi-devel gcc make automake autoconf libtool libffi-devel
Download the installation package
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
decompress
tar -zxvf Python-3.7.2.tgz
come in directory
cd Python-3.7.2
Initialize the environment
./configure --prefix=/usr/local/python3
Install
make && make install
Set soft link
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
Check python3 version
python3 -V