When a package's exact name is not known (python3, python38, something scl) file name searches can do a more complete search: yum provides '*bin/python3*'

Correct, there is no python3.8 in EPEL 7. There is a python3.6 in EL 7, and EPEL policy is not to replace EL packages. Plus the distro's policy to avoid major upgrades, would seem like it is stuck on older Python.

Your yum repo list hints that CentOS software collections are enabled, which could be an alternative.

yum install centos-release-scl-rh
yum install rh-python38-python

Note both the package name and the files are prefixed, which allows coexistence with other pythons. While perhaps SCL is not the most popular packaging convention, it is already built and public, an advantage over your own source builds.

Currently CentOS 7 is 87 weeks from end of life, which is not a lot by EL time scales. Most of the maintainer attention is on EL 8 and 9, 7 is critical fixes only.

Budget some of that time to figure out what you are are going to do post CentOS 7. Which may be non-trivial, as CentOS 8 is dead, and if Stream is not what you need, may be switching distros.

Answer from John Mahowald on serverfault.com
🌐
TecAdmin
tecadmin.net › install-python-3-8-centos
How To Install Python 3.8 on RHEL/CentOS 7 & Fedora 34 ...
April 26, 2025 - Python is a powerful programming language. It is very friendly and easy to learn. At the writing time of this article Python 3.8 latest stable version is available to download and install. This article will help you to install Python 3.8.12 on your CentOS, Red Hat & Fedora operating systems.
🌐
Cloudera
docs.cloudera.com › cdp-private-cloud-base › 7.1.8 › installation › topics › cdpdc-install-python-3-centos.html
Installing Python 3.8 on CentOS 7 for Hue
January 18, 2024 - You must install Python 3.8 on ... Enterprise Linux (OEL) 7, CentOS 7, RHEL 7, then you must install Python 3.8 and then install the psycopg2-binary package for using PostgreSQL as a backend database for Hue....
Discussions

Trying to install python3.9 on CentOS 7
Just curious, why are you sticking with CentOS 7 instead of upgrading to CentOS Stream 9, Rocky Linux 9, RedHat EL 9 or Alma 9? More on reddit.com
🌐 r/CentOS
7
10
October 19, 2022
Installing python3.8 alongside python3.6 Centos
As far as i recall, centos has installs that install with specific version names. rh-python3.8 https://centos.pkgs.org/7/centos-sclo-rh-x86_64/rh-python38-python-3.8.6-1.el7.x86_64.rpm.html If that's what you'll be installing (or something similar) you should be fine. More on reddit.com
🌐 r/learnpython
7
2
October 5, 2021
Installing Python on a CentOS7 base image. Failing when I try to run configure --enable-optimizations. I'm guessing that I haven't specified the path to configure correctly.
don't really need to decipher the code, it tells you the problem right there - opt/Python-3.8.6/configure: No such file or directory try adding / before opt RUN /opt/Python-3.8.6/configure --enable-optimizations and remove WORKDIR /Python-3.8.6/ as a side note, I don't think you'll have pip to execute pip install -r /app/requirements.txt instead try pip3.8 More on reddit.com
🌐 r/docker
4
2
December 12, 2020
Cleanest way to install Python 3.7 on CentOS 7 image
Have you considered usinh the official Python 3.7 Docker image ? More on reddit.com
🌐 r/docker
7
1
July 10, 2019
🌐
Victordomingos
no-title.victordomingos.com › articles › 2020 › install_python_centos_linux › index.html
How to install the current Python version on CentOS Linux 7 | The No Title® Tech Blog
April 26, 2020 - You find out which development package provides that dependency. You install it using a package manager (for CentOS 7, it’s yum, but for other versions or other Linux distributions it could be dnf, apt-get or even other package managers).
🌐
Server World
server-world.info › en › note
CentOS 7 : Install Python 3.8 : Server World
This article provides an example of how to install Python 3.8 from a package and check that it works on CentOS 7.
🌐
Medium
medium.com › @mrx04programmer › installing-any-updated-version-of-python-on-centos-7-8-or-arch-linux-563cabc8bb3c
Install any updated version python on centOS 7/8 | by mrx04programmer | Medium
August 16, 2023 - sudo yum -y update sudo yum -y install wget sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel · wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
🌐
LinuxTut
linuxtut.com › en › 592483c7625e881d771f
Install Python 3.8 on CentOS 7 (SCL)
June 24, 2020 - 1 root root 9 Jun 24 10:31 /opt/rh/rh-python38/root/usr/bin/python3 -> python3.8 -rwxr-xr-x. 1 root root 15280 May 28 09:39 /opt/rh/rh-python38/root/usr/bin/python3.8 # python -V Python 3.8.0 # python3 -V Python 3.8.0 # yum info rh-python38 Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: ftp.riken.jp * centos-sclo-rh: ftp.riken.jp * centos-sclo-sclo: ftp.riken.jp * extras: ftp.riken.jp * updates: ftp.riken.jp Installed Packages Name : rh-python38 Arch : x86_64 Version : 2.0 Release : 4.el7 Size : 0.0 Repo : installed From repo : centos-sclo-rh Summary : Package that installs rh-python38 License : GPLv2+ Description : This is the main package for rh-python38 Software Collection.
Find elsewhere
🌐
Reddit
reddit.com › r/centos › trying to install python3.9 on centos 7
r/CentOS on Reddit: Trying to install python3.9 on CentOS 7
October 19, 2022 -

I've tried a few didnt online guides but nothing seems to be helping me achieve what I'm looking for. I have a Linux machine for my network environment that I use for automation. I'm trying to upgrade my python 3.6.8 to some version of 3.9.x. I want to remove python 3.6.8, install 3.9, and then put 3.9 as the default for every user on the box.

Current Version of Linux 3.10.0-1160.6.1.el7.x86_64

I'm not a linux pro but I know some things.

🌐
Vinod Pandey
vinodpandey.com › how-to-install-python3-on-centos-7
How to Install Python 3 on Centos 7 | Vinod Pandey
January 10, 2021 - Introduction In this tutorial we will install Python 3.6, 3.7, 3.8 & 3.9 on CentOS 7. The default python version in CentOS 7 is 2.7.5. If we forcefully upgrade or replace this version, yum and other utitiles may break causing the OS to become unstable.
🌐
GitHub
gist.github.com › yedamao › 230ae4460ce80b2f3b270047cf9bbca8
centos 7 install python3.8 · GitHub
centos 7 install python3.8 · Raw · install-python3.8.sh · This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ·
🌐
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 - CentOS Install Deno on RHEL 10 ... 7 CentOS How to Install LAMP Stack on RHEL 10 | CentOS Stream 10 ... sudo yum install -y xz-devel cd Python-3.8*/ ./configure –enable-optimizations sudo make altinstall Repl...
🌐
DevOpsSchool.com
devopsschool.com › blog › installing-python-3-on-linux-centos-ubuntu-windows
Python Tutorials: Installing Python 3 on Linux, Centos, Ubuntu & Windows
August 7, 2023 - Home Uncategorised Python Tutorials: ... · 2 Comments · $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install python3.8 $ python3 ...
🌐
MonoVM
monovm.com › blog › centos › how to install python 3 on centos 7?
How to Install Python 3 on CentOS 7?
January 15, 2024 - If you're working in a CentOS 7 environment (Community ENTerprise Operating System), you may need to Install Python CentOS 7. You have two basic options including Yum install Python 3.8 CentOS 7.
🌐
Liquid Web
liquidweb.com › home › how to install python 3 on centos 7
Install Python 3 on CentOS 7: Easy Steps for Linux Users | Liquid Web
April 7, 2025 - Upgrade your CentOS 7 server to Python 3 with ease using our step-by-step guide featuring Yum and install Python3 Linux instructions.
🌐
Bits and Dragons
bitsanddragons.wordpress.com › 2019 › 11 › 07 › installing-python-3-8-0-as-a-module-on-centos-7
Installing python 3.8.0 as a module on CentOS 7 | Bits and Dragons
November 8, 2019 - After make install, I still don’t have the new python by default, but I’m able to run it: root@test ~ ## > /net/python-3.8.0/python Python 3.8.0 (default, Nov 7 2019, 16:17:32) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information.
🌐
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 - sudo dnf install gcc openssl-devel bzip2-devel libffi-devel · Before you do anything, you need to update Centos, do this with the following command: ... You can download Python from its official site using the following command. cd /opt wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
🌐
Docker Hub
hub.docker.com › r › centos › python-38-centos7
centos/python-38-centos7 - Docker Image
The RHEL images are available in the Red Hat Container Catalog⁠, the CentOS images are available on Quay.io⁠, and the Fedora images are available in Fedora Registry⁠. The resulting image can be run using podman⁠ or docker⁠. Note: while the examples in this README are calling podman, you can replace any such calls by docker with the same arguments · Python 3.8 available as container is a base platform for building and running various Python 3.8 applications and frameworks.
🌐
InMotion Hosting
inmotionhosting.com › inmotion hosting home › support › server technologies › linux › how to install python 3.9 on centos 7
How to Install Python 3.9 on CentOS 7 | InMotion Hosting
March 21, 2025 - Now that we have PIP installed, we can proceed with installing the latest version of Python, 3.9. Before installing Python you will first need to install the requisite software packages using the following command: sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel
🌐
Eldernode
blog.eldernode.com › linux vps › install python 3.9 on centos 8 & centos 7
How To Install Python 3.9 On CentOS 8 & Centos 7
November 8, 2020 - python does not install in centos by default. for this reason, in this article we will teach you how to install python 3.9 on centos 8, centos 7