Upgrading pip keeps the package installer aligned with current resolver fixes, packaging metadata handling, and security updates before those differences turn routine package installs into avoidable failures. Refreshing pip is especially useful when a new virtual environment still carries the older bundled bootstrap copy or when identical install commands start behaving differently across machines.
Current pip documentation still recommends running the installer through the exact interpreter that owns the target environment with python -m pip. That keeps the self-upgrade attached to one Python installation or virtual environment instead of whichever pip executable happens to appear first in PATH, and python3 -m pip --version shows the precise site-packages path that will change.
Distro-managed Python installations on Debian, Ubuntu, Fedora, and related systems may be marked EXTERNALLY-MANAGED, which blocks global pip changes outside a virtual environment. The command examples use python3 in a POSIX shell and assume the target interpreter already has pip available; replace the launcher with python or py when that is the local command name, and bootstrap the bundled installer first with python3 -m ensurepip --upgrade if the interpreter reports that the pip module is missing.
Steps to upgrade pip itself:
- Confirm which interpreter and pip instance will receive the upgrade.
$ python3 --version Python 3.14.3 $ python3 -m pip --version pip 26.0 from /srv/dependency-audit/.venv/lib/python3.14/site-packages/pip (python 3.14)
The path in the pip --version output shows which Python installation or virtual environment will be modified.
If python3 -m pip --version fails because pip is missing, bootstrap the bundled copy first with python3 -m ensurepip --upgrade or install the packaged pip build for the current operating system. Some distro packages intentionally omit ensurepip and expect the operating system package manager to provide pip instead.
Related: How to check Python version
Related: How to install pip on Ubuntu
Related: How to install pip on CentOS Stream or Red Hat Enterprise Linux
Related: How to install pip on Windows - Upgrade pip through that interpreter.
$ python3 -m pip install --upgrade pip Collecting pip Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 26.0 Uninstalling pip-26.0: Successfully uninstalled pip-26.0 Successfully installed pip-26.0.1Current upstream examples use python -m pip install --upgrade pip on Linux and macOS, and py -m pip install --upgrade pip on Windows. The python3 -m pip form shown here is the same workflow when python3 is the local interpreter command.
If this command fails with error: externally-managed-environment, do not use --break-system-packages just to modify a distro-owned interpreter. Upgrade pip inside a project virtual environment instead, or update the packaged Python tooling through the operating system package manager.
- Verify that the new pip version is active in the same interpreter context.
$ python3 -m pip --version pip 26.0.1 from /srv/dependency-audit/.venv/lib/python3.14/site-packages/pip (python 3.14)
The version number should increase while the path still points to the same environment you checked before the upgrade.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
