Score:3

no python38 pkg found for centos 7

in flag

I have CentOS 7, Is there any option how to install python 3.8 on CentOS 7 ? Looks that no pkg found in all repos. So only option is to compile from source ? Why is not supported in EPEL... ?

yum install python38
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: bay.uchicago.edu
 * centos-sclo-rh: centos-distro.1gservers.com
 * epel: fedora.westmancom.com
 * extras: abqix.mm.fcix.net
 * updates: centos.mirrors.hoobly.com
No package python38 available.
djdomi avatar
za flag
centos 7 is dead... upgrade ;)
andrew avatar
in flag
OK, I was thinking that END is (30 Jun 2024)
John Mahowald avatar
cn flag
Although the last security update has not yet been released for CentOS 7, that does not mean its software is getting new versions. A Python 3 had to happen during 7's lifecycle, but they locked the version in the base OS repo. See my answer for an alternative.
Score:4
cn flag

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.

djdomi avatar
za flag
it's as always, keep your stuff in the mainstream support, not on the extended. That's why you should consider to upgrade and think about why imho is 7 dead
jamshid avatar
tn flag
Thanks! To get requests working on centos7 I also had to: PATH=${PATH}:/opt/rh/rh-python38/root/usr/bin/ && yum install -y rh-python38-python-pip openssl && python3 -m pip install requests && python3 -m pip install "urllib3 <=1.26.15"
jamshid avatar
tn flag
And remember python 3.8 itself is EOL 2024-10 (https://devguide.python.org/versions/), a few months after centos 7's 2024-06 EOL. Rockylinux and Centos 8 Stream have python39 which is EOL 2025-10. Note Centos 8 Stream's EOL is 2024-05 after which you must switch to rockylinux:8 or Centos 9 Stream (https://wiki.centos.org/About/Product).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.