How to Install Python 3.9 on Linux

yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget -y

wget https://mirror.cnop.net/python/Python-3.9.0.tgz
tar -zxvf Python-3.9.0.tgz
cd Python-3.9.0

./configure –enable-shared –prefix=/usr/local CFLAGS=-fPIC LDFLAGS="-Wl,-rpath /usr/local/lib"
make -j2

make install

Check the version:

python3 –version

ln -sf /usr/local/bin/python3.9 /usr/bin/python3
ln -sf /usr/local/bin/pip3.9 /usr/bin/pip3

Leave a Comment

Your email address will not be published.