Utility guide
Fix “pip is not recognized”
Use the section for your operating system when a Terminal, Command Prompt,
or PowerShell window cannot find pip or pip3.
After completing the relevant steps, close and reopen your terminal before retrying the original pip command.
Windows
- Go to Settings > Apps > Installed apps.
- Search for Python.
- Choose the version you are using. If it still does not work, repeat these steps for the other installed Python versions too.
- Click the three dots next to it and choose Modify.
- In the pop-up window, choose Modify again.
- Tick all the boxes you are allowed to and click Next.
- Again tick all the boxes you are allowed to and click Install.
- Open a new terminal window and retry your original pip command.
macOS
Stay in Terminal and run:
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
You can also use python3 -m pip in place of a standalone
pip command.
Linux
Try Python's built-in pip setup first:
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
If that does not work, install pip with your distribution's package manager.
| Distro family | Example distros | Package manager | Update command | Install pip3 command |
|---|---|---|---|---|
| Debian-based | Ubuntu, Mint, Kali | apt |
sudo apt update |
sudo apt install python3-pip |
| Fedora-based | Fedora, Nobara | dnf |
sudo dnf check-update |
sudo dnf install python3-pip |
| RHEL-based | RHEL 8+, Alma, Rocky | dnf / yum |
sudo dnf check-update |
sudo dnf install python3-pip |
| Older RHEL | CentOS 7, RHEL 7 | yum |
sudo yum check-update |
sudo yum install python3-pip |
| Arch-based | Arch, Manjaro | pacman |
sudo pacman -Sy |
sudo pacman -S python-pip |
| openSUSE | Leap, Tumbleweed | zypper |
sudo zypper refresh |
sudo zypper install python3-pip |
| Alpine | Alpine Linux | apk |
sudo apk update |
sudo apk add py3-pip |
| Gentoo | Gentoo Linux | emerge |
sudo emerge --sync |
sudo emerge --ask dev-python/pip |
| Void | Void Linux | xbps |
sudo xbps-install -S |
sudo xbps-install -S python3-pip |
| Solus | Solus | eopkg |
sudo eopkg update-repo |
sudo eopkg install python3-pip |
| NixOS | NixOS | nix-env |
nix-channel --update |
nix-env -iA nixos.python3Packages.pip |