Install dependencies

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc libffi-devel

Download decompression

cd /usr/local/

mkdir python3

cd python3/

Wget HTTP: / / https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz

The tar ZXF Python - 3.8.2 TGZ

CD Python - 3.8.2

compile

./configure

make

make install

Backup python2

mv /usr/bin/python /usr/bin/python.bak

Create a new soft connection

Ln -s/usr/local/bin/python3.8 / usr/bin/python

Change the YUM configuration because YUM uses PYTHon2

vim /usr/bin/yum

vim /usr/libexec/urlgrabber-ext-down

Combine the #! The/usr/bin/python to #! The/usr/bin/python2.