Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentclee/22ffe5f398ad484eb611a4e5ab179981 to your computer and use it in GitHub Desktop.
Save vincentclee/22ffe5f398ad484eb611a4e5ab179981 to your computer and use it in GitHub Desktop.
Install Python 3.7.0 on Centos 7
Install Python 3.7.6 on CentOS/RHEL 7
1.Requirements:
yum install gcc openssl-devel bzip2-devel make
2.Download Python 3.7:
cd /usr/src
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz
tar xzf Python-3.7.6.tgz
3.Install Python 3.7.6:
cd Python-3.7.6
./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.6.tgz
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