pip: command not found
If you see pip: command not found, it means the pip executable isn’t installed or isn’t on your system PATH. This is common on fresh Python installations or when using a minimal base image.
What It Means
The shell cannot find the pip command in any directory listed in your PATH environment variable. This usually means pip is not installed, or it’s installed under a different name (e.g. pip3).
Why It Happens
- Python was installed without pip (some Linux distros split them)
- You’re using a virtual environment that hasn’t been activated
- The pip executable uses a different name on your system
- PATH doesn’t include the directory where pip is installed
How to Fix It
Option 1: Use python -m pip directly
If Python itself is installed, pip may be available as a module even if the standalone command is missing:
- Try running pip as a Python module instead:
python -m pip install requests- On some systems you might need
python3:
python3 -m pip install requestsOption 2: Install pip with ensurepip
Python includes the ensurepip module to bootstrap pip:
- Run ensurepip:
python -m ensurepip --upgrade- Verify installation:
python -m pip --versionOption 3: Install via system package manager
On Debian/Ubuntu:
sudo apt update
sudo apt install python3-pipOn Fedora/RHEL:
sudo dnf install python3-pipOn macOS with Homebrew:
brew install pythonOption 4: Add pip to PATH manually
If pip is installed but not in PATH, locate it and add it:
find / -name pip 2>/dev/null
export PATH="$PATH:/path/to/pip-directory"Add the export line to your ~/.bashrc or ~/.zshrc to make it permanent.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro