Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Install pip with your Linux distribution’s package manager, then use it through the matching Python interpreter. On Debian or Ubuntu, the usual setup is sudo apt update && sudo apt install python3-pip python3-venv. For project libraries, create a virtual environment instead of modifying the system Python; use pipx for standalone command-line applications.
Check whether Python and pip are already installed
Python must be installed before pip. Check both the interpreter and pip module:
python3 --version
python3 -m pip --version
A successful second command reports the pip version, the Python version it belongs to, and its installation path. Prefer python3 -m pip over a bare pip or pip3; the module form makes sure pip runs under the interpreter you selected. Linux distributions differ, so Arch users commonly use python instead:
python --version
python -m pip --version
If Python itself is missing, install Python and the distribution’s pip and virtual-environment packages before installing Python packages.
#1 Best Overall
Install pip with your Linux distribution’s package manager
pip installs Python distribution packages, often from PyPI. It is separate from apt, dnf, pacman, and zypper, which install packages integrated with the operating system. The commands below follow the Python Packaging User Guide’s Linux instructions (PyPA Linux package-manager guide).
| Distribution | Install command | Verify with |
|---|---|---|
| Debian, Ubuntu, Linux Mint | sudo apt update && sudo apt install python3-pip python3-venv |
python3 -m pip --version |
| Fedora | sudo dnf install python3-pip |
python3 -m pip --version |
| RHEL 9 with Python 3.9 | sudo dnf install python3.9-pip |
python3.9 -m pip --version |
| RHEL 9 with Python 3.11 | sudo dnf install python3.11-pip |
python3.11 -m pip --version |
| RHEL 9 with Python 3.12 | sudo dnf install python3.12-pip |
python3.12 -m pip --version |
| Arch Linux | sudo pacman -S python-pip |
python -m pip --version |
| openSUSE | sudo zypper install python3-pip python3-setuptools python3-wheel |
python3 -m pip --version |
Debian, Ubuntu and Linux Mint
python3-pip supplies pip. python3-venv supplies the standard-library virtual-environment workflow, which you will generally need for safe project installs. If you only want a distribution-maintained library, check whether an apt package is available; names do not always match PyPI names. For example, a repository may provide python3-requests, but package availability and naming vary.
Fedora
The minimal pip package is python3-pip. PyPA also documents sudo dnf install python3-pip python3-wheel when you want the broader packaging tool set. Keep third-party installs in a virtual environment because Fedora’s system Python may be externally managed.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →RHEL 9
RHEL package names are tied to the Python stream. First identify the interpreter you intend to use:
python3.9 --version
python3.11 --version
python3.12 --version
Install the matching python3.9-pip, python3.11-pip, or python3.12-pip package, then invoke pip with that same interpreter. Red Hat documents these version-specific packages and warns that root-level pip installs can override RHEL libraries (RHEL 9 Python packaging documentation).
Install packages safely in a virtual environment
For an application or development project, isolate dependencies from the operating system and from other projects:
-
Create and enter a project directory:
mkdir my-project cd my-project -
Create the environment:
python3 -m venv .venv -
Activate it:
source .venv/bin/activate -
Upgrade pip inside this environment and install your package:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.python -m pip install --upgrade pip python -m pip install requests
After activation, python and pip refer to the environment. Confirm that before troubleshooting:
which python
which pip
python --version
python -m pip --version
The displayed paths should contain .venv. Leave the environment with:
deactivate
PyPA documents this workflow in its pip and virtual environments guide.
Understand and fix externally-managed-environment
Modern distributions can place an EXTERNALLY-MANAGED marker in the system Python. pip then refuses to write to that interpreter-wide location because the operating system’s package manager controls those files. This behavior is defined by the externally managed environments specification.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For a project dependency, install the venv support if necessary and use an environment:
sudo apt install python3-venv
python3 -m venv .venv
source .venv/bin/activate
python -m pip install PACKAGE
Do not make sudo pip install PACKAGE your workaround. It can replace files expected by apt, dnf, or RHEL and leave system software inconsistent.
Use pipx for standalone Python applications
Use pipx when the package is a command-line application such as a formatter, linter, or other tool you want available from any directory. pipx creates a separate virtual environment for each application and places its executable on your user path. It is not a replacement for installing libraries into a project.
Install pipx
Install it through your distribution where available:
sudo apt install pipx # Debian or Ubuntu
sudo dnf install pipx # Fedora
Then configure your path and install an application:
pipx ensurepath
pipx install black
black --version
Open a new terminal if the command is not found immediately. See the PyPA standalone command-line tools guide and pipx Linux installation guide.
If pip is still missing
Try ensurepip only when appropriate
Python’s supported bootstrap module is:
python3 -m ensurepip --upgrade
Distribution builds may omit or restrict ensurepip. If Python came from your Linux distribution, installing its python*-pip package remains the preferred route.
Rank #4
Reserve get-pip.py for special installations
pip documents get-pip.py as another supported mechanism:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11python3 get-pip.py
Download the script only from the official pip/PyPA source (pip installation documentation). Do not use it casually on Ubuntu, Debian, Fedora, Arch, or RHEL system Python: PyPA warns that it does not coordinate with the operating-system package manager and can create conflicts. pip’s standalone .pyz application is experimental and is not recommended for production.
Troubleshoot common errors
pip: command not found
pip may be absent, named differently, outside PATH, or attached to another Python installation. Run:
python3 -m pip --version
If that fails, install the distribution package in the table above. After activating a virtual environment, use python -m pip.
python3: No module named pip
Install python3-pip (or the matching version-specific package on RHEL), then retry the same interpreter-specific verification command.
No module named venv
On Debian-family systems install:
sudo apt install python3-venv
Other distributions may include venv in Python or use a distribution-specific package name.
Best Value
Permission denied
Do not immediately add sudo. Create a virtual environment and install there. Root-level pip can overwrite system libraries; Red Hat specifically cautions against that practice.
An installed command cannot be found
For a project tool, activate the correct .venv and inspect its location:
python -m pip show PACKAGE
which COMMAND
For pipx, run pipx ensurepath, then start a new terminal.
Recommended Free Tools
Multiple Python versions are installed
Use one interpreter consistently:
python3.11 -m pip --version
python3.11 -m venv .venv
python3.11 -m pip install PACKAGE
Do not mix python3.11 -m pip with python3.12 or an unrelated pip3 unless that difference is deliberate.
Choose the right installer
| Goal | Recommended tool | Reason |
|---|---|---|
| System-integrated software or OS dependencies | apt, dnf, pacman, or zypper |
The distribution manages files, updates, and dependencies. |
| Library for one project | venv plus python -m pip |
Dependencies stay isolated and reproducible. |
| Standalone Python command-line application | pipx |
Each application gets its own environment and a user-level executable. |
Unusual Python installation with no distro package or usable ensurepip |
get-pip.py, cautiously |
It can bootstrap pip, but it does not integrate with the OS package manager. |
Distribution packages may lag behind PyPI, while mixing distribution-managed and pip-managed copies can make ownership unclear. Keep the system interpreter under the operating system’s control and install project dependencies in isolated environments.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

