Fedora toolchain and multiple versions
Fedora moves fast, and so does its toolchain: needing several language versions on one machine is normal. This page covers organisation only — what travels with the system and what must go into an isolated environment. For hands-on steps see Isolated development with Toolbox and Fedora containers and rootless.
The system Python constraint: follow the official Python chapter
Section titled “The system Python constraint: follow the official Python chapter”Fedora’s Python packaging and version policy is set by the Python chapter of the official Packaging Guidelines: the constraints on the system Python, packaging and naming rules, and how multiple versions coexist all follow that chapter — which is itself part of the rpm packaging specification.
The constraint does not mean “you cannot upgrade Python”; it means first work out which Python you intend to touch:
- The system Python is part of the distribution and system tools depend on it; changing it brings no benefit to your project and all the risk.
- The project runtime is what you actually control: put it in an isolated environment and leave the system copy alone.
- The basis is not a blog: naming, dependencies and module paths are all specified in that official chapter; organise multiple versions the way it describes and maintainability follows.
Package management and repositories: the foundation of the toolchain
Section titled “Package management and repositories: the foundation of the toolchain”The official Quick Docs provide package management and repository docs under Adding and managing software: from everyday dnf usage to adding and removing Fedora repositories, they are the prerequisite knowledge for any toolchain work.
Before installing a toolchain, separate three things:
- Where packages come from: repository configuration decides which version you get; Fedora repositories and the package manager is the prerequisite for this page.
- The package manager itself is changing: commands and output are not fully identical across the two generations; read the practical differences of the package manager migration before acting.
- Official entry points: Quick Docs Using the DNF software package manager and Fedora DNF repositories.
Isolated toolchains: three levels
Section titled “Isolated toolchains: three levels”The same “install a new version” need has three levels, with isolation strength and cost rising in order:
| Approach | Scope of isolation | Cost |
|---|---|---|
| The language’s own virtual environment | dependencies only | shares the interpreter and system libraries with the host |
| Toolbx container | a complete command-line environment | still integrated with the host |
| General container | the image is the environment | you carry builds and data management yourself |
- Only dependencies need isolating: when a per-project virtual environment (Python venv, a Node version manager and so on) is enough, do not bring in anything heavier.
- A whole toolchain needs isolating: Isolated development with Toolbox gives you an environment with common tools and documentation in a few commands.
- Reproducibility and distribution: Fedora containers and rootless writes the environment into an image, at the cost of managing builds and volumes yourself.
Habits from other distributions: alternatives and SCL
Section titled “Habits from other distributions: alternatives and SCL”People coming from the EL family often switch system defaults with alternatives, or use SCL-style parallel software collections. In Fedora terms, do two things before deciding whether to use them:
- Find the mapping: what your need is called in the official docs and which chapter specifies it — for Python, the Packaging Guidelines chapter from the previous section.
- Work out the blast radius: alternatives changes the system-level default target, so every user and every service follows. Unless that is deliberate and you have a rollback ready, do not use it to satisfy “my project needs another version”.
This page does not assume alternatives or SCL is the road you should take on Fedora. The only principle is: what can be solved by isolation should not be solved by system-level replacement — that is a judgement method, not an endorsement of any particular option.
Reproducing development environments
Section titled “Reproducing development environments”The value of an isolated environment is that it can be thrown away and rebuilt. For that sentence to hold, the environment must first be described:
- Write it into the project: interpreter and dependency versions and required system libraries all go into version control (lock file or environment definition).
- Name the environment: name containers or toolboxes by project; do not let a pile of default names accumulate — nobody dares delete them six months later.
- One command to enter: after cloning the repository, a newcomer should be one command away from a usable toolchain.
- Rebuild regularly: rebuild an environment when it goes stale; do not patch it by hand inside isolation — that is just replaying the host’s mess somewhere else.
Common misconceptions
Section titled “Common misconceptions”- “One global version in the system is simplest”: it saves time today and costs you the entanglement between system tools and project dependencies.
- “A virtual environment is isolation”: it only isolates dependencies; the interpreter and system libraries stay shared with the host.
- “Untrusted scripts are fine inside an isolated environment”: the official positioning of Toolbx carries an explicit warning; see Isolated development with Toolbox.
- “Copying a tutorial from another distribution is fine”: packaging rules are written per distribution; copying across distributions usually trips on naming and path rules.
Three levels in practice (measured on F45)
Section titled “Three levels in practice (measured on F45)”The same “I need another version” has three implementations. First see what the system has:
python3 --versionrpm -q python3dnf repoquery --whatprovides 'python3.*' | head -3Level one: the language’s own virtual environment (dependencies only)
python3 -m venv ~/venvs/websource ~/venvs/web/bin/activatepip install -r requirements.txtdeactivateLevel two: a Toolbx container (the whole toolchain)
sudo dnf install toolboxtoolbox create --container proj --assumeyestoolbox run --container proj python3 --versionFedora release 45 (Forty Five)Level three: the image is the environment
podman run --rm -v $PWD:/src:Z -w /src registry.fedoraproject.org/fedora-minimal:45 \ sh -c 'dnf -y install python3-pip >/dev/null && python3 --version'In one line: missing dependencies → venv; missing a whole toolchain → Toolbx; delivering to others → an image.
Do not solve versions with system-level replacement
Section titled “Do not solve versions with system-level replacement”sudo dnf install <another version>On Fedora that usually means replacing a system package: swap python3 and every system tool depending on it changes too. Unless you are deliberately migrating, that is not “installing a new version” but “replacing part of the system”.
Test it with rpm -q --whatrequires python3 | wc -l — the bigger the number, the less you should touch it.
Related pages
Section titled “Related pages”- Fedora repositories and the package manager — repository layout and third-party sources
- Module streams (retired) — why “switch the stream” is no longer an option
- Moving from dnf to dnf5 — command and script differences
- Isolated development with Toolbox — a toolchain environment in a few commands
- Fedora containers and rootless — reproducible, distributable environments