Skip to content

pip: command not found — How to Fix

If you’ve encountered pip: command not found while trying to install a Python package, don’t worry — this is one of the most common errors for new Python developers. Here’s how to fix it.

Quick Fix (Linux)

sudo apt update && sudo apt install python3-pip

After installation, verify it works:

pip3 --version

If pip (without the 3) still doesn’t work, you may need to create a symlink:

sudo ln -s /usr/bin/pip3 /usr/bin/pip

Why This Happens

The error occurs because pip is not installed or not in your system’s PATH. Modern Linux distributions often ship with Python 3 but not pip by default. On Windows, pip may not be added to PATH during Python installation.

Platform-Specific Fixes

macOS

If you installed Python via Homebrew:

brew install python

This installs both Python 3 and pip together.

If you used the official Python installer from python.org, pip should already be installed. Try running:

python3 -m pip --version

Windows

  1. Open “Add or remove programs” and find Python
  2. Click “Modify” and ensure “pip” is checked during installation
  3. Alternatively, add Python’s Scripts folder to PATH manually:
C:\Users\YourName\AppData\Local\Programs\Python\Python3xx\Scripts

Using python -m pip (works everywhere)

If pip is installed but not in PATH, you can always use:

python3 -m pip install package_name

This runs pip as a module and works regardless of PATH settings.

Reinstall pip (last resort)

If nothing else works, you can reinstall pip:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

Need more programming help? Check out our command guide collection.