sudo yum -y groupinstall "Development Tools"
sudo yum -y install gcc devel libffi-devel openssl11 openssl11-devel
wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz
tar zxvf Python-3.10.2.tgz
cd Python-3.10.2/
./configure
make
If you are getting errors like Could not build the ssl module! Python requires a OpenSSL 1.1.1 or newer, verify that you are installing openssl11
and openssl11-devel
in Step 1.
sudo make altinstall
python3.10 --version
# Output
Python 3.10.2
cd ~
python3.10 -m venv myvenv
source myvenv/bin/activate
pip install requests
deactivate
Category: Python