Install Python 3.7.3 from source
a) Prepare Your System
# yum -y groupinstall "Development Tools" # yum -y install zlib-devel libffi-devel
b) Download python Source Code
# cd /usr/local/src # wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
Note: As of writing this article, the current version is 3.7.3
c) Build Python
# cd /usr/local/src # tar xvf Python-3.7.3.tgz # cd Python-3.7.3 # ./configure --with-ensurepip=install --enable-shared # make # make install
After installation please create a symlink for the shared object library by using the following command:
ln -s /usr/local/lib/libpython3.7m.so.1.0 /usr/lib64/libpython3.7m.so.1.0
Upgrade pip
pip3.7 install --upgrade pip
Note: Please note that after installation, the new version’s binary path will be located at /usr/local/bin/python3.7