pip "command not found" on the runner in CI
The shell could not find a pip executable on PATH. The interpreter may not have a standalone pip script, or the venv that holds it was never activated.
What this error means
A step calling pip install ... fails with "pip: command not found" even though python --version works.
python
/home/runner/work/_temp/script.sh: line 1: pip: command not found
Error: Process completed with exit code 127.Common causes
No standalone pip launcher on PATH
Some images expose only pip3, or pip exists only as a module under a specific Python, with no pip on PATH.
A venv that was never activated
pip lives inside a virtual environment that the current step did not activate, so the shell cannot find it.
How to fix it
Invoke pip through the interpreter
Call pip as a module so you always use the pip belonging to the exact Python you mean.
Terminal
python -m pip install --upgrade pip
python -m pip install -r requirements.txtEnsure pip is installed and on PATH
- Confirm pip exists with
python -m ensurepip --upgrade. - Activate the venv that holds pip if you are using one.
- Prefer
python -m pipover barepipin every step.
Terminal
python -m ensurepip --upgradeHow to prevent it
- Always call
python -m pipso PATH lookup is never an issue. - Activate the right venv in each step that needs pip.
- Use setup-python, which provisions pip alongside the interpreter.
Related guides
pip "externally-managed-environment" (PEP 668) in CIFix pip "error: externally-managed-environment" in CI - pip refuses to install into a system Python protected…
Python "command not found" / wrong version on the runner in CIFix "python: command not found" or the wrong Python version on a CI runner - the runner exposes `python3` but…
Python venv activate not persisting across steps in CIFix a Python venv that activates in one CI step but is gone in the next - each step runs in a fresh shell, so…