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-pipAfter installation, verify it works:
pip3 --versionIf pip (without the 3) still doesn’t work, you may need to create a symlink:
sudo ln -s /usr/bin/pip3 /usr/bin/pipWhy 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 pythonThis 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 --versionWindows
- Open “Add or remove programs” and find Python
- Click “Modify” and ensure “pip” is checked during installation
- Alternatively, add Python’s Scripts folder to PATH manually:
C:\Users\YourName\AppData\Local\Programs\Python\Python3xx\ScriptsUsing python -m pip (works everywhere)
If pip is installed but not in PATH, you can always use:
python3 -m pip install package_nameThis 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.pyNeed more programming help? Check out our command guide collection.