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).

What pip Is Rejecting

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

Fix the command

Prefer running pip through the interpreter you intend to use:python3 -m pip install <package>

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).

If you're using a virtual environment, recreate it to ensure pip is present:python3 -m venv .venv then . .venv/bin/activate

After fixing, upgrade pip inside that same environment:python3 -m pip install --upgrade pip

Check the exact command and local inputs

Check whether pip is on PATH:command -v pip (or which pip).

Check whether pip3 exists: command -v pip3.

Ask Python itself for pip:python3 -m pip --version (preferred over pip ...).

If this is inside a virtualenv, ensure it is activated:echo $VIRTUAL_ENV and python -c 'import sys; print(sys.executable)'

Typical Output

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

Why the Command Was Rejected

Usually this comes down to 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), or your PATH does not include the environment's bin/ directory (or the virtual environment is not activated).

Re-run the Minimal Correct Command

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

How pip validates the command before it runs

This is the part worth understanding if the quick fix did not hold. It explains what pip is trying to do at the moment the error appears.

When you type pip, your shell searches each directory in the PATH environment variable for an executable named pip.

If pip is not installed (or installed in a different Python environment), the shell prints command not found before Python is ever started.

Avoid Command and Config Drift

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

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

Join our mailing list