Error Knowledge Base PIP COMMAND_NOT_FOUND

bash: pip: command not found

Your shell can't find a `pip` executable on `PATH` (or you're using an environment where `pip` is intentionally not installed).

Affected versions: All pip versions (this is a shell/installation issue).

What This Error Means

Your shell can't find a pip executable on PATH (or you're using an environment where pip is intentionally not installed).

How to Fix It

  1. Prefer running pip through the interpreter you intend to use: python3 -m pip install <package>.
  2. If pip is missing entirely, install it using your OS package manager (for example apt install python3-pip, dnf install python3-pip, brew install python).
  3. If you're using a virtual environment, recreate it to ensure pip is present: python3 -m venv .venv then . .venv/bin/activate.
  4. After fixing, upgrade pip inside that same environment: python3 -m pip install --upgrade pip.

Why It Happens

  • pip is not installed for the Python you are using.
  • You installed pip in a different Python environment than the one on your PATH (multiple Pythons / multiple envs).
  • Your PATH does not include the environment's bin/ directory (or the virtual environment is not activated).

How to Verify

  1. Run python3 -m pip --version and confirm it prints a version and a Python path you expect.
  2. Re-run your original pip install ... using python3 -m pip ....

Manual pip discovery checks

  1. Check whether pip is on PATH: command -v pip (or which pip).
  2. Check whether pip3 exists: command -v pip3.
  3. Ask Python itself for pip: python3 -m pip --version (preferred over pip ...).
  4. If this is inside a virtualenv, ensure it is activated: echo $VIRTUAL_ENV and python -c 'import sys; print(sys.executable)'.

Common CLI Output

bash: pip: command not found
zsh: command not found: pip

How shells find executables

  1. When you type pip, your shell searches each directory in the PATH environment variable for an executable named pip.
  2. If pip is not installed (or installed in a different Python environment), the shell prints command not found before Python is ever started.

Prevention Tips

  • Use python -m pip instead of pip to avoid PATH ambiguity.
  • Use virtual environments per project and activate them before installing dependencies.
  • Avoid mixing system Python and custom-installed Python on the same machine without clear PATH management.

Where This Can Be Triggered

Not thrown by pip itself

This message is emitted by your shell / OS launcher (or by the Python interpreter) before pip runs, so there is no pip source file/line to link to.

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list