Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)
closed by

Can anyone tell me how to get python 3.7.6 installed on CentOS 7 ?

closed

3 Answers

0 votes
by (15.4k points)
 
Best answer
Here's the steps to install python on centreos 7:

Enable the EPEL repository:

sudo yum install epel-release

Install dependencies:

sudo yum install yum-utils

Add the IUS repository:

sudo yum install https://centos7.iuscommunity.org/ius-release.rpm

Install Python 3.7.6:

sudo yum install python37

Verify installation:

python3.7 --version

By following these steps, you can install Python 3.7.6 on CentOS 7.
0 votes
by (26.4k points)

I think the way to progress was refreshing LD_LIBRARY_PATH and PATH to incorporate openssl as I went.

Install and build the openssl

OpenSSL 1.1.1d 10 Sep 2019

cloned openssl repo

Pulled out latest(?) 1.1 branch

git checkout OpenSSL_1_1_1d -b 1_1_1d

./config --prefix=/opt/openssl

make

make install

Add /opt/openssl/lib to your LD_LIBRARY_PATH env var

Add /opt/openssl/bin to your PATH

Install and build python-3.7.6

I installed with --prefix=/opt/python-3.7.6

./configure --prefix=/opt/python-3.7.6  --enable-optimizations --with-openssl=/opt/openssl

make

make install

Add /opt/python-3.7.6/lib to your LD_LIBRARY_PATH env var

Add /opt/python-3.7.6/bin to your PATH

Final config

LD_LIBRARY_PATH=/opt/openssl/lib:/opt/python-3.7.6/lib:

PATH=/opt/openssl/bin:/opt/python-3.7.6/bin:/opt/idea/latest/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

Wanna become a Python expert? Come and join the python certification course and get certified.

To know more about this you can have a look at the following video tutorial:-

0 votes
by (25.7k points)
To install Python 3.7.6 on CentOS 7, you can follow these steps:

Enable the EPEL (Extra Packages for Enterprise Linux) repository by running the following command:

sudo yum install epel-release

Install the required dependencies by executing the following command:

sudo yum install yum-utils

Add the IUS (Inline with Upstream Stable) repository, which provides a package for Python 3.7, by running the following command:

sudo yum install https://centos7.iuscommunity.org/ius-release.rpm

Install Python 3.7.6 using the following command:

sudo yum install python37

Verify the installation by checking the Python version:

python3.7 --version

After following these steps, you should have Python 3.7.6 successfully installed on your CentOS 7 system.

Browse Categories

...