Skip to content
Runbook

Install Python on Fedora / RHEL

General-purpose programming language and runtime, batteries included.

Runtimelanguageruntimescriptinginterpreter

Installation

Python 3 + pip · dnf
sudo dnf install -y python3 python3-pip

Verify the installation

Verify
python3 --version

Important files

TypePathDescription
binary/usr/bin/python3System Python 3 interpreter managed by DNF.

Command-line tools

  • python3The Python 3 interpreter.
  • pip3Package installer for Python.

Uninstall

Uninstall pip
sudo dnf remove -y python3-pip

Do not remove python3: the system depends on it.

Good to know

  • Fedora ships a recent Python 3 as the system interpreter; do not remove it.
  • venv is part of the standard library (python3 -m venv); no extra package needed.
  • Alternate versions are available as packages like python3.12 alongside the default.

Installation on Fedora

Fedora ships a recent Python 3. sudo dnf install -y python3 python3-pip ensures the interpreter and pip are present. Unlike Debian/Ubuntu, venv is included in the standard library — no separate package.

Virtual environments

Create one per project: python3 -m venv .venv, then source .venv/bin/activate. Avoid sudo pip, which can break DNF-managed packages.

Alternate versions

Fedora packages several minor versions (for example python3.12) that install alongside the default interpreter, so you can target a specific one without disturbing the system Python.