Choosing a Newer Python Version on Red Hat Enterprise Linux 9 Without Breaking System Tools
Learn how to install a supported newer Python interpreter alongside the system default on RHEL 9 using AppStream versioned packages, and understand the trade‑offs.
14 Sept 2026, 09:38 UTC

The Problem: New Application Needs a Newer Python
You have a Red Hat Enterprise Linux 9 server and an application that requires Python 3.12, but the system’s default python3 package provides an older interpreter (for example, 3.9). Changing the default python3 would break OS tools that depend on it, so you need a way to run a newer version alongside the existing one.
How RHEL 9 Delivers Multiple Runtimes
RHEL splits its repositories into BaseOS (the kernel and core user‑space) and AppStream (languages, databases, developer tools). In RHEL 9 the AppStream model uses versioned packages instead of modular streams. Packages such as python3.12, nodejs20 or postgresql15 can be installed in parallel with the default python3 that BaseOS relies on. Each versioned package carries its own support window, published by Red Hat for the specific minor release.
Worked Example: Installing Python 3.12 on RHEL 9
- Check what Python versioned packages are available in the enabled AppStream repo:
dnf list available "python3*" - Install the newer interpreter and its pip companion (requires root or sudo):
sudo dnf install python3.12 python3.12-pip - Verify the installation without affecting the system default:
python3.12 --version pip3.12 --version - Optionally test that the interpreter can import standard library modules:
python3.12 -c 'import sys'
Trade‑offs and Limitations
- The support life of
python3.12may be shorter than the RHEL 9 BaseOS lifecycle; consult the Red Hat Application Streams lifecycle page for the exact end‑of‑life date. - Not all versioned packages allow parallel installation; for example, multiple PostgreSQL server packages conflict and require separate tooling or containers.
- The default
python3pointer remains unchanged, so system scripts continue to use the BaseOS version. You must invoke the newer interpreter explicitly (python3.12) or adjust shebangs in your own scripts. - Installing additional packages pulls in dependencies; review the transaction summary before confirming to avoid unexpected changes.
Actionable Closing
Before committing to a newer runtime on a production host, check the available streams or versioned packages with dnf list available, confirm the support window on the Customer Portal, and try the installation in a disposable VM or a Red Hat UBI 9 container. If you need longer support than the versioned package provides, consider running the application in a Red Hat Universal Base Image container or using a toolbox for isolation.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.