Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Python 3.7.5 on Centos 7
Install Python 3.7.5 on CentOS/RHEL 7
yum install gcc openssl-devel bzip2-devel libffi-devel
# Below requirement for djang projects
yum install readline-devel tk-devel tk-devel openssl-devel sqlite-devel openssl tk readline sqlite
2.Download Python 3.7:
cd /usr/src
tar xf Python-3.7.5.tar.xz
3.Install Python 3.7.5:
cd Python-3.7.5
./configure --enable-optimizations
make altinstall
(make altinstall is used to prevent replacing the default python binary file /usr/bin/python)
4.Remove downloaded source archive file from your system:
rm /usr/src/Python-3.7.5.tar.xz
5.Check Python Version
python3.7 -V
echo 'alias python3.7="python3"' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment