Python 3.7 is not available as an rpm for RHEL 8. There's 3.6 and 3.8/3.9 available. If you want, you can compile it to have it on your system:

dnf install gcc openssl-devel bzip2-devel libffi-devel

cd /opt && wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz

tar xvzf Python-3.7.9.tgz

cd Python-3.7.9

./configure --enable-optimizations

make altinstall

After that, you can refer to the binary as python3.7

Answer from Alex on Stack Exchange
🌐
TecAdmin
tecadmin.net › install-python-3-7-on-centos-8
How to Install Python 3.7 on CentOS/RHEL 8 – TecAdmin
April 26, 2025 - Login to your CentOS 8 system with root or sudo privileged account. Desktop users open a terminal on your system. Then use the following command to install required development libraries for Python before installing it. sudo dnf install gcc ...
🌐
Red Hat
developers.redhat.com › blog › install-python3-rhel
How to install multiple versions of Python on Red Hat Enterprise Linux | Red Hat Developer
February 27, 2024 - Let's go ahead and install Python 3.9 on RHEL 8: ... Verify this specific installation using: python3.11 --version. In addition, for installing the pip package installer, add on the -pip extension to the version of python being installed, for example: ... $ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms $ yum group install "Development Tools" While Python 2.7 is the default implementation for RHEL 7, newer versions of the Python interpreter and libraries are available as Red Hat Software Collections packages.
Discussions

python3 - need a help to find python 3.7 rpm for RHEL 8.4 - Unix & Linux Stack Exchange
We need a Python 3.7 rpm for RHEL 8.4, I am not able to find this on the official python website. Please share the link or redirect where I get this rpm for download. We need this rpm as the CDSW 1.10.2 to come with 3.7 kernels and So to work with the pyspark (Spark 2.4) we need to install python ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
December 7, 2022
rhel - How to install python3 with all it is tools on Redhat RHEL7 offline machine - Unix & Linux Stack Exchange
I need to include everything locally, ... to run python, I have added tons and tons of packages, but still, it gives me error all the time. I'm using this install.sh script to achieve that purpose · #!/bin/bash cd ./needed_pkgs/ rpm -i build-essentials-2019-3pclos2019.noarch.rpm zlib-1.2.7-18.el7.x86_64.rpm gcc-c++-4.8.5-39.el7.... More on unix.stackexchange.com
🌐 unix.stackexchange.com
Installing Python 3 on RHEL - Stack Overflow
For RHEL/CentOS 6:) wget ... collection: yum install rh-python34 # 5. Start using software collections: scl enable rh-python34 bash · rhel and centos version 7 are now on python 3.6 by default i believe · the SCL yum repo has python version 3.8 as of the date of this ... More on stackoverflow.com
🌐 stackoverflow.com
python - what is the formal latest python3 installtion on rhel 7.X servers - Stack Overflow
What's great about software collections is that Python 3.8 installations will be exactly the same across your servers - whether you install some today or in 3 months. A problem with other alternatives (e.g. EPEL) is that the package set may be one thing today but be different in 3 months. Also, software collections allow you to install 2 different Pythons in parallel without contention. A lot of RHEL 7 ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Red Hat
access.redhat.com › solutions › 6998875
Can I install Python 3.7 on RHEL 8 using Red Hat Software Collections? - Red Hat Customer Portal
August 28, 2025 - How to install Python 3.7 on Red Hat Enterprise Linux 8? Can we install Python 3.7 on Red Hat Enterprise Linux 8?
🌐
nixCraft
cyberciti.biz › nixcraft › howto › package management › rhel 8 install python 3 or python 2 using yum
RHEL 8 install Python 3 or Python 2 using yum - nixCraft
May 23, 2024 - Search for python package in RHEL 8, run: sudo yum search python3 · To install python 3 on RHEL 8, run: sudo yum install python3
🌐
TecAdmin
tecadmin.net › install-python-3-8-centos
How To Install Python 3.8 on RHEL/CentOS 7 & Fedora 34 ...
April 26, 2025 - This article will help you to install Python 3.8.12 on your CentOS, Red Hat & Fedora operating systems.
Find elsewhere
🌐
Cloudera
docs.cloudera.com › cdp-private-cloud-base › 7.1.9 › installation › topics › cdpdc-cm-install-python-3-rhel-custom-location.html
Installing standard Python 3.8 binary on RHEL 7, RHEL 8 at a standard or custom location
July 19, 2024 - You can install Python 3.8 in a ... instructions with the custom path. ... If you are using RHEL 8, Cloudera recommends that you uninstall Python 2.7, if it is present on your hosts....
Top answer
1 of 16
257

Installing from RPM is generally better, because:

  • you can install and uninstall (properly) python3.
  • the installation time is way faster. If you work in a cloud environment with multiple VMs, compiling python3 on each VMs is not acceptable.

Solution 1: Red Hat & EPEL repositories

Red Hat has added through the EPEL repository:

  • Python 3.4 for CentOS 6
  • Python 3.6 for CentOS 7

[EPEL] How to install Python 3.4 on CentOS 6

sudo yum install -y epel-release
sudo yum install -y python34

# Install pip3
sudo yum install -y python34-setuptools  # install easy_install-3.4
sudo easy_install-3.4 pip

You can create your virtualenv using pyvenv:

pyvenv /tmp/foo

[EPEL] How to install Python 3.6 on CentOS 7

With CentOS7, pip3.6 is provided as a package :)

sudo yum install -y epel-release
sudo yum install -y python36 python36-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo

If you use the pyvenv script, you'll get a WARNING:

$ pyvenv-3.6 /tmp/foo
WARNING: the pyenv script is deprecated in favour of `python3.6 -m venv`

Solution 2: IUS Community repositories

The IUS Community provides some up-to-date packages for RHEL & CentOS. The guys behind are from Rackspace, so I think that they are quite trustworthy...

https://ius.io/

Check the right repo for you here:

https://ius.io/setup

[IUS] How to install Python 3.6 on CentOS 6

sudo yum install -y https://repo.ius.io/ius-release-el6.rpm
sudo yum install -y python36u python36u-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo

[IUS] How to install Python 3.6 on CentOS 7

sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
sudo yum install -y python36u python36u-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo
2 of 16
207

It is easy to install python manually (i.e. build from source):

  1. Download (there may be newer releases on Python.org):

     $ wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
    
  2. Unzip

     $ tar xf Python-3.* 
     $ cd Python-3.*
    
  3. Prepare compilation

     $ ./configure
    
  4. Build

     $ make
    
  5. Install

     $ make install
    

    OR if you don't want to overwrite the python executable (safer, at least on some distros yum needs python to be 2.x, such as for RHEL6) - you can install python3.* as a concurrent instance to the system default with an altinstall:

     $ make altinstall
    

Now if you want an alternative installation directory, you can pass --prefix to the configurecommand.

Example: for 'installing' Python in /opt/local, just add --prefix=/opt/local.

After the make install step: In order to use your new Python installation, it could be, that you still have to add the [prefix]/bin to the $PATH and [prefix]/lib to the $LD_LIBRARY_PATH (depending of the --prefix you passed)

🌐
TecMint
tecmint.com › home › python › how to install latest python from source in linux
How to Install Python in RHEL and Debian Systems
August 10, 2023 - In this article, we will show how to install and use Python in RHEL and Debian-based distributions with core tools that can be used in the Linux command line.
🌐
IBM
ibm.com › support › pages › work-around-frustrating-python-3-install-rhel7
Work-around the frustrating Python 3 install on RHEL7
For reasons I cannot fathom, it is very hard to install Python version 3 on RHEL7 - here is my work-around. and reminder for myself. It seems I am not alone on this annoying RHEL 7 missing feature, so I thought I would share the solution.
🌐
Google Groups
groups.google.com › g › vfx-platform-discuss › c › D-rdtZJV4nI
Python 3.7 on CentOS 7 (and 8)
I don't know if this has been discussed before, but I was curious why Python 3.7 was chosen instead of 3.6 knowing that CentOS 7 and 8 don't provide 3.7 out of the box yet. I'm in favor of moving to newer versions and know that 3.6 is going EOL at the end of 2021, but in this case the required Python version isn't available on CentOS or RHEL distribs currently used in VFX studios.
🌐
GitHub
github.com › saltstack › salt › issues › 61346
[FEATURE REQUEST] Packaging - Require a newer Python version on RHEL 8 · Issue #61346 · saltstack/salt
December 10, 2021 - Is your feature request related to a problem? Please describe. Python 3.6 EOL is 2 weeks away or so. Currently, the RHEL8 RPM requires this version and installs it on systems which may already have Python installed. Describe the solution you'd like The EL repos have Python 3.8 and Python 3.9 available.
Author   saltstack
🌐
Eldernode
blog.eldernode.com › tutorial install python 3.8 on centos/rhel 8 linux
Tutorial Install Python 3.8 on Centos/RHEL 8 Linux
September 4, 2024 - cd /opt wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz · Note: If wget is not enabled, you can install it with the following command: ... After extracted, go to Python-3.8.3 folder, Then configure the source files based on your server or system environment.
🌐
ComputingForGeeks
computingforgeeks.com › home › install python 3.13 on rhel 10 / rocky linux 10 / almalinux 10
Install Python 3.13 on Rocky Linux / AlmaLinux [2 Methods]
March 24, 2026 - AlmaLinux Customize KDE Plasma ... CentOS, RHEL 9|8 ... sudo yum install -y xz-devel cd Python-3.8*/ ./configure –enable-optimizations sudo make altinstall Reply · This procedure worked like a charm (I need to get off Python 3.6.8 ASAP but will be trapped on CentOS-7.9 for at least ...
🌐
Red Hat
access.redhat.com › solutions › 2353081
Python 3 support for Red Hat Enterprise Linux (RHEL) 7 - Red Hat Customer Portal
What is the official RH standpoint on Python 3.x support? Red Hat Enterprise Linux (RHEL) 7 · Python 3.x · A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more. Log in for full access Log In · Learn more about Red Hat subscriptions ·
🌐
GitConnected
levelup.gitconnected.com › how-to-install-python-3-8-on-rhel-8-and-centos-8-fac11aef2165
How to Install Python 3.8 on RHEL 8 and CentOS 8 | by Amit Kumar Manjhi | Level Up Coding
November 8, 2022 - How to Install Python 3.8 on RHEL 8 and CentOS 8 Add Python 3.8 to RHEL 8/CentOS 8/Stream The standard repository for RHEL 8.0 provides Python 3.8. It can be installed using the dnf or yum …