AlmaLinux AppStream Modules: Enable Python 3.11 Stream and Preserve RHEL‑9 Compatibility
Learn how to enable a Python 3.11 module stream on AlmaLinux, verify binary compatibility with RHEL 9, and understand the trade‑offs of modular package management.
23 Jan 2026, 14:34 UTC

Concrete Problem
Developers and sysadmins often need a specific runtime, such as Python 3.11, without disturbing the system default. On RHEL‑based distributions, the AppStream repository exposes these runtimes as modular streams. AlmaLinux, being binary‑compatible with RHEL 9, offers the same feature set, but the exact steps and caveats can be confusing for those who are new to modular package management.
How AlmaLinux Mirrors RHEL 9 AppStream
AlmaLinux’s /etc/yum.repos.d/almalinux.repo contains an AppStream section that points to the same upstream metadata as RHEL 9. The repository layout is identical, so every module stream available in RHEL 9 is (in principle) present in AlmaLinux. The dnf module command is used to query, enable, and disable streams. Because the packages are built against the same source RPMs and carry the same version numbers, binaries installed from a stream are binary‑compatible with RHEL 9.
Practical Example: Enabling Python 3.11
- Verify the AppStream repo
# cat /etc/yum.repos.d/almalinux.repo | grep -i appstream [AppStream] name=AlmaLinux 9 AppStream baseurl=https://repo.almalinux.org/almalinux/9/AppStream/x86_64/os/ enabled=1 - List available streams
# dnf module list python Name Stream Summary python 3.9 Python 3.9 python 3.10 Python 3.10 python 3.11 Python 3.11 - Enable the desired stream
# dnf module enable python:3.11After enabling,
dnf module list pythonwill show3.11asenabled. - Install the package
# dnf install python3This installs
/usr/bin/python3.11, leaving the system default/usr/bin/python3untouched. - Verify the installation
# rpm -qa | grep python3 python3-3.11.5-1.el9.noarchChecking the binary against a RHEL 9 system:
# diff -q /usr/bin/python3.11 /usr/bin/python3.11 (on RHEL 9)Both binaries should be identical, confirming binary compatibility.
Trade‑offs and Limitations
- Release lag – AlmaLinux may not ship a module stream immediately after RHEL 9 releases it. This delay can postpone access to new features.
- Missing or renamed modules – Some RHEL modules are omitted or renamed in AlmaLinux, so a
dnf module listmay not show everything you expect. - Dependency conflicts – Enabling multiple streams that provide the same package name can cause resolution failures. Use
dnf module resetto revert conflicting streams. - Version lock risk – Pinning a stream with
dnf versionlockprotects against accidental upgrades but can also block critical security fixes if not monitored. - Administrative overhead – Managing streams adds complexity for small teams; a clear policy on which streams are enabled helps keep the system manageable.
Actionable Checklist for Sysadmins
- Ensure
AppStreamis enabled and pointing to the correct baseurl. - Run
dnf module list <name>to identify available streams. - Enable the stream you need:
dnf module enable <name>:<stream>. - Install the module package(s) and verify with
rpm -qa | grep <package>. - Use
rpm -qf /usr/bin/<binary>to confirm the binary’s source RPM and version. - Consider
dnf versionlockonly after you have a monitoring strategy for security updates. - Document the streams enabled per environment to avoid drift.
Conclusion
AlmaLinux’s AppStream module system gives you the same granular control over runtimes that RHEL 9 provides, with the guarantee of binary compatibility. By following the steps above, you can safely enable a specific Python stream, verify its correctness, and understand the trade‑offs involved. Keep your modules documented, monitor security advisories, and you’ll have a robust, reproducible environment for your applications.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.