# install python3
sudo yum -y updatesudo yum -y install yum-utilsyum install -y zlib-devel bzip2-devel ncurses-develyum install libffi-develsqlite-devel wgetwget https://www.openssl.org/source/openssl-1.1.1b.tar.gztar xvf openssl-1.1.1b.tar.gzcd openssl-1.1.1b./configmakemake install# openssl will be installed to /usr/local/ssl# please add the path /usr/local/lib64 to /etc/ld.so.conf and run ldconfig
vi /etc/ld.so.conf# add /usr/local/lib64ldconfigwget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgztar xzf Python-3.7.3.tgzcd Python-3.7.3vi Modules/Setup.dist# uncomment the following lines# Socket module helper for SSL support; you must comment out the other# socket line above, and possibly edit the SSL variable:# :SSL=/usr/local/ssl# _ssl _ssl.c \# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \# -L$(SSL)/lib -lssl -lcrypto./configure --enable-optimizationsmake altinstall