yum install -y python3
[root@centos7 ~]# yum update -y
yum install -y python3
python3
$ sudo yum install wget gcc openssl-devel libffi-devel bzip2-devel
$ yum install python3
$ python3
$ wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
sudo yum update
sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
# install requirements
yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel xz-devel
# Download python version
cd /usr/src
wget https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz
# extract package
tar xzf Python-3.7.11.tgz
# Install Python
cd Python-3.7.11
./configure --enable-optimizations
make altinstall # Used to prevent replacing the default python binary file /usr/bin/python.
rm /usr/src/Python-3.7.11.tgz