How-To Install Python 3.7 on Centos 7.5

Spread the love

Centos 7.5 ships with the outdated Python 2.7 but the current version is 3.7. This guide will show you how to install Python 3.7 on Centos 7.5 in just a few easy steps.

Install Requirements

Run the following command to install prerequisites for Python 3.7

yum install gcc openssl-devel bzip2-devel  libffi-devel

Download Python 3.7

Lets download Python 3.7 to our server and extract it.

cd /usr/src
tar xzf Python-3.7.0.tgz

Install Python 3.7 on Centos 7.5

Installing is as easy as running the following commands:

cd Python-3.7.0
./configure --enable-optimizations
make altinstall

now we can clean up the downloaded file:

rm -f /usr/src/Python-3.7.0.tgz

and now we can test to make sure it was installed correctly:

python3.7 -V

Which should return:

Install Python 3.7 on Centos 7.5

You now have the latest version of Python installed on Centos 7.5!

Spread the love

Leave a Reply

1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
jose Recent comment authors
newest oldest most voted
Notify of

I didn’t worked for me
bash: python3.7: command not found
I think you missed something