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.comTrying to install python3.9 on CentOS 7
Installing python3.8 alongside python3.6 Centos
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.
Cleanest way to install Python 3.7 on CentOS 7 image
Videos
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.
I have a centos7 server which already uses python3.6, but on one user account, I want to be using python3.8 in a virtual environment. Is it safe to just install python 3.8 onto the server and just use that for the virtual environment or is this going to cause problems for my python3.6 installation? I've found info about this for Ubuntu, where you can use alternative installs, but nothing for centos.
If I have to rebuild the server with python 3.8 I will, but I really would rather not if it's safe to have the two together.