
You just set up a fresh Fedora 44 machine, and the first thing your project needs is Python. Maybe you are a developer getting a new workstation ready, a sysadmin configuring a Linux server, or a student following a course that assumes Python is already there. Whatever your reason, this guide walks you through every method to install Python on Fedora 44, from the fastest one-liner to advanced multi-version management with pyenv.
By the end of this tutorial, you will know how to install Python on Fedora 44, verify the installation, manage multiple versions side by side, isolate your project dependencies with virtual environments, and solve the most common errors people run into. Every command comes with a plain-English explanation of what it does and why it matters, not just copy-paste instructions.
Prerequisites
Before you start, confirm you have the following ready:
- Fedora 44 installed (physical machine, virtual machine, or container)
- A non-root user account with
sudoprivileges - An active internet connection (DNF pulls packages directly from Fedora’s official repositories)
- Access to a terminal emulator (GNOME Terminal, Konsole, or an SSH session)
- Basic comfort running commands in a terminal (no expert knowledge required)
If you are running a minimal Fedora 44 server image, some packages referenced in this guide may not be pre-installed. The guide flags those cases as they come up.
Step 1: Check If Python Is Already Installed
The first thing you should do on any Fedora 44 system is check what Python is already available before installing anything new.
Fedora 44 ships with Python 3 as the system default interpreter, and the /usr/bin/python symlink points to Python 3 out of the box. Fedora 43 shipped with Python 3.14 as the default, and Fedora 44 packages include Python 3.12, 3.14, and even early builds of Python 3.15. That means you likely already have a working Python 3 on your machine.
Run these two commands to check:
python --version
python3 --version
Expected output:
Python 3.14.x
or
Python 3.12.x
Why This Step Matters
Fedora uses its system Python internally for critical tools like DNF (the package manager) and Anaconda (the installer). If you skip this check and blindly install a new Python version, you risk creating a version conflict that breaks those tools. Knowing what is already there lets you make an informed decision about whether you need to install anything at all.
Step 2: Update Fedora 44 Before Installing Any Package
Before touching any package, update your system. This is a non-negotiable step in any Linux server tutorial.
sudo dnf update && sudo dnf upgrade -y
What this command does:
dnf updaterefreshes all repository metadata and downloads newer versions of installed packagesdnf upgrade -yapplies those updates automatically without asking for confirmation on each one
Why You Cannot Skip This
DNF resolves package dependencies against the repository metadata cached on your system. If that metadata is stale, DNF may pull in an older Python version, resolve dependencies against outdated libraries, or throw a conflict error mid-install. Running dnf update first costs you about 60 seconds and prevents hours of debugging.
On a production Linux server, this step also closes any known security vulnerabilities before you add a new runtime to the system.
Step 3: Install Python on Fedora 44 Using DNF
For most users, DNF is the right tool for this job. It is Fedora’s official package manager, and it integrates Python directly into the RPM package system. That means Python updates arrive automatically alongside your normal system updates, and removal is clean.
Install the Default Python 3
sudo dnf install python3 -y
This pulls the latest Python 3 version available in Fedora 44’s official repositories and registers it under RPM package management.
Expected output:
Installed:
python3-3.14.x-x.fc44.x86_64
Complete!
Install Python Development Headers
For most real-world Python work, you also need the development package:
sudo dnf install python3-devel python3-pip -y
What python3-devel provides:
- C header files that Python uses when compiling extension modules like
psycopg2,lxml, orPillow - Without this package,
pip installfails with a crypticgcc: errorthe moment it hits any package that includes a C extension
What python3-pip provides:
- The
pipcommand-line tool for installing Python packages from PyPI - On a minimal Fedora 44 server image, pip is not always bundled with the base Python install, so it is safer to install it explicitly
Install a Specific Python Version
Fedora 44’s repositories include multiple Python versions side by side. You can install them without removing the default:
sudo dnf install python3.12 -y
sudo dnf install python3.14 -y
Why install a specific version?
Different projects have different requirements. A legacy Django 3.x application might need Python 3.10. Your new FastAPI project might target Python 3.12. Installing specific versions via DNF keeps each one managed under RPM, meaning future updates and clean removal all go through standard DNF commands.
Verify the Installation
python3 --version
python3.12 --version
Expected output:
Python 3.14.x
Python 3.12.13
Step 4: Manage Multiple Python Versions on Fedora 44
Once you have more than one Python version installed, you need a reliable way to switch the active default. Fedora handles this with the alternatives system, a native Red Hat/Fedora mechanism for managing symbolic links between competing program versions.
Register Each Version
sudo alternatives --install /usr/bin/python python /usr/bin/python3.14 2
sudo alternatives --install /usr/bin/python python /usr/bin/python3.12 1
The number at the end is the priority. Higher priority becomes the default unless you manually override it.
Why use alternatives instead of editing symlinks by hand?
Manual symlink editing is error-prone and not reproducible. The alternatives system updates /usr/bin/python atomically, meaning the symlink always points to a valid binary. There is no window where a script picks up a broken or missing interpreter.
Switch the Active Python Version
sudo alternatives --config python
This presents an interactive menu:
There are 2 programs which provide 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/bin/python3.14
2 /usr/bin/python3.12
Enter to keep the current selection[+], or type selection number:
Type the selection number and press Enter. The change takes effect immediately in any new terminal session.
Confirm the Switch
python --version
Expected output (if you selected Python 3.12):
Python 3.12.13
Step 5: Set Up a Python Virtual Environment on Fedora 44
This step is where a lot of beginner tutorials cut corners, and it leads to broken systems later. Virtual environments are not optional in a proper Python on Fedora 44 setup. They are how professional developers and sysadmins isolate project dependencies.
Why Virtual Environments Are Essential
When you run pip install without a virtual environment, packages go into the system Python’s site-packages directory. DNF also manages packages in that space. The two package managers can silently overwrite each other, and the result is a broken Python environment that is very difficult to debug. Virtual environments eliminate this entirely by giving each project its own isolated Python prefix.
Create a Virtual Environment
python3.12 -m venv myproject-env
Notice the command calls python3.12 directly, not just python3. This pins the virtual environment to a specific interpreter version. Even if you later switch the default Python with alternatives, this virtual environment keeps using 3.12.
What this creates:
myproject-env/
bin/ (Python interpreter, pip, activate script)
lib/ (installed packages live here)
pyvenv.cfg (records which Python version this env uses)
Activate the Virtual Environment
source myproject-env/bin/activate
After activation, your terminal prompt changes:
(myproject-env) [user@fedora44 ~]$
This tells you the virtual environment is active. Now python and pip resolve to the binaries inside myproject-env/bin/, not the system ones.
Install Packages Inside the Environment
pip install requests flask
All packages go into myproject-env/lib/python3.12/site-packages/. Nothing touches the system Python. Another project using a completely different version of requests will not conflict, because it lives in its own isolated environment.
Deactivate When You Are Done
deactivate
Your prompt returns to normal and your shell’s PATH reverts to the system defaults. Forgetting to deactivate before switching projects is a common source of “wrong Python” bugs, especially in automated scripts and CI/CD pipelines.
Step 6: Configure Python on Fedora 44 with pyenv (Advanced)
If you need a Python version that Fedora 44’s repositories do not yet carry, or you want per-directory Python version switching across multiple projects, pyenv is the right tool for configuring Python on Fedora 44.
Unlike DNF, pyenv compiles Python from source and installs it entirely within your home directory at ~/.pyenv. The system Python stays completely untouched.
Install pyenv Build Dependencies
pyenv compiles Python from source, so it needs the C libraries that CPython depends on:
sudo dnf install -y make gcc zlib-devel bzip2-devel readline-devel \
sqlite-devel openssl-devel tk-devel libffi-devel xz-devel git
Why every package here matters:
openssl-develprovides TLS support; without it,urllibandpipcannot make HTTPS connectionslibffi-develis required for thectypesmodule used by many popular packages- Missing any dependency produces a Python binary that appears to install correctly but silently lacks key standard library modules
Install pyenv
curl https://pyenv.run | bash
This script clones pyenv into ~/.pyenv and also installs the pyenv-virtualenv and pyenv-update plugins automatically.
Configure Your Shell
Add these lines to the end of your ~/.bashrc file:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Then reload the shell:
source ~/.bashrc
Why the eval line is necessary:
eval "$(pyenv init -)" installs pyenv’s shim layer into your shell. Shims are tiny wrapper scripts that intercept every call to python or pip and route them to the correct version based on your project directory. Without this line, pyenv is installed but does nothing useful.
Install a Python Version with pyenv
pyenv install 3.12.0
Set it as the global default:
pyenv global 3.12.0
Set a per-project version by running this inside your project directory:
pyenv local 3.10.14
This creates a .python-version file that pyenv reads automatically whenever you enter that directory.
Step 7: Install and Manage pip Packages
With Python installed and a virtual environment active, you are ready to manage packages. A few habits here will save you from common Linux server tutorial mistakes.
Upgrade pip First
pip install --upgrade pip
Fedora’s bundled pip version may lag several releases behind PyPI’s latest. An outdated pip can miss the latest wheel files for your platform or fail to resolve newer package metadata correctly.
Install Packages the Right Way
# Inside an active virtual environment (recommended)
pip install package-name
# User-level install, no virtual environment, no sudo
pip install --user package-name
Never do this:
sudo pip install package-name # Do NOT run this
Running sudo pip install on Fedora writes packages directly into the system Python’s site-packages directory, which DNF also manages. Mixing pip and RPM package management in the same Python prefix is a documented path to a broken system. You may not notice the damage until a dnf upgrade silently overwrites a package your scripts depend on.
Troubleshooting Common Python Installation Errors on Fedora 44
Error 1: No module named venv
Cause: On some minimal Fedora 44 server images, the venv module is stripped out of the base Python install.
Fix:
sudo dnf install python3 -y
If that does not resolve it:
sudo dnf install python3-libs -y
Error 2: pip: command not found
Cause: python3-pip is not included in Fedora’s minimal image Python install.
Fix:
sudo dnf install python3-pip -y
Error 3: error: command ‘gcc’ failed during pip install
Cause: python3-devel is missing. Packages with C extensions need the Python header files to compile.
Fix:
sudo dnf install python3-devel gcc -y
Error 4: error: externally-managed-environment
Cause: This error comes from PEP 668, which newer Python versions enforce to protect the system Python from accidental corruption via pip.
Fix (correct approach): Create a virtual environment and install your packages inside it.
python3 -m venv myenv
source myenv/bin/activate
pip install package-name
Do not use the --break-system-packages flag as a workaround. It bypasses the protection that PEP 668 exists to provide.
Error 5: alternatives: error: no alternatives for python
Cause: You ran sudo alternatives --config python before registering any versions.
Fix:
sudo alternatives --install /usr/bin/python python /usr/bin/python3.14 1
sudo alternatives --config python
Congratulations! You have successfully installed Python. Thanks for using this tutorial for installing Python programming language on your Fedora 44 Linux system. For additional or useful information, we recommend you check the official Python website.