Install Python on Fedora 43
Fedora 43 ships with Python 3.14 by default. In this guide I will teach you how to install Python 3.10 and 3.12 on Fedora 43 step-by-step.
Step 1: Update Fedora 43
Before installing Python on your system update Fedora to ensure you have the latest repositories. To update Fedora type:
sudo dnf update && sudo dnf upgrade
Step 2: Find the current version of Python on Fedora 43
Fedora 43 has Python 3.14 by default. To check the default version of Python on Fedora 43 type:
python --version

As you can see from the above screenshot, the version of Python in Fedora 43 is 3.14.0.
Step 3: How to install Python 3.10 and 3.12 on Fedora 43
Fedora 43 provides Python 3.10 and 3.12 directly through its official repositories. This means you can use the Fedora’s package manager, DNF, to install multiple versions of Python.
To install Python 3.10 on Fedora 43 type:
sudo dnf install python3.10

To install Python 3.12 on Fedora 43 type:
sudo dnf install python3.12
Step 4: How to switch between different versions of Python on Fedora 43
In Step 2 we showed to you that Fedora 43 defaults to Python 3.14. You can change the default version of Python in Fedora by using the alternatives utility as below.
First you register each Python version with alternatives:
sudo alternatives --install /usr/bin/python python /usr/bin/python3.10 1
sudo alternatives --install /usr/bin/python python /usr/bin/python3.12 3
sudo alternatives --install /usr/bin/python python /usr/bin/python3.14 2

The following is the explanation of the above commands:
- /usr/bin/python — path of the symbolic link.
- python — the group name used to group multiple versions of Python together.
- /usr/bin/python3.10, /usr/bin/python3.12, and /usr/bin/python3.14 — the actual binaries you are adding.
- 1, 2 and 3 — the priority numbers; the higher the number, the higher the priority.
Since Python 3.12 has the priority of 3, the highest number, it will be the default global Python on Fedora 43. To switch the default version of Python on Fedora 43 type:
sudo alternatives --config python
Step 5: How to manage different versions of Python with virtual environments on Fedora 43
Different projects often require different versions of Python and their associated packages. For example, you might have one Django project that depends on Python 3.10, while another project requires Python 3.12 or newer.
Managing Python projects with the help of virtual environments ensures each project runs in isolation, preventing package and dependency conflicts. In short, virtual environments let you install Python packages in a separate directory instead of installing them system-wide.
Step 5.1: Create a virtual environment with Python on Fedora 43
To create a virtual environment use the Python’s venv package as below:
python3.10 -m venv py310

Step 5.2: Activate Python virtual environment on Fedora 43
Working inside a Python virtual environment requires its activation. To activate your Python virtual environment type:
source py310/bin/activate

Step 5.3: Install Python packages with pip inside the Python virtual environment on Fedora 43
Now that the virtual environment is activated you can install in the packages in isolation with pip.
pip install requests==2.25.1
Step 5.4: Deactivate Python virtual environment on Fedora 43
To deactivate your Python virtual environment type:
deactivate
Note: To create a virtual environment with a different version of Python on Fedora 43, simply replace python3.10 with the desired version ( for example, python3.12 or python3.14) in the above command.
Final thoughts
In this tutorial, you learned how to install Python 3.10 and Python 3.12 on Fedora 43 using the DNF package manager. You also saw how to switch between different Python versions using the alternatives command and how to create a virtual environments to keep your projects isolated.
If you are interested in a more flexible way to install and manage multiple versions of Python check my step-by-step tutorial on installing Python with pyenv on Fedora 43.
