Recently purchased a cloud server, you can not order directly installed python3, this to be a record
Reference Source: http://ask.xmodulo.com/install-python3-centos.html
1. Install the necessary tools
sudo yum install yum-utils
2. Use the yum-builddep command to set the python compiler environment, download the missing dependency
sudo yum-builddep python
3. Download the source code python3
The source code can be https://www.python.org/ftp/python/ download
-The curl https://www.python.org/ftp/python/3.8.0/Python-3.8.0a1.tgz
4. compile the source code and install decompress
tar xf Python-3.8.0a1.tgz
cd Python-3.8.0a1
./configure
sudo make && make install
5. Now python3 has completed the installation, use python3 -version to see the version number
It said that it has successfully displayed Python 3.8.0a1
python3 --version
6. If you want to python3 as the default python parser can be set as follows
alias python='/usr/local/bin/python3.8'