What This Error Means
The Python interpreter you're running does not have pip installed (or the environment is broken/corrupted).
How to Fix It
- If available, bootstrap pip with
python3 -m ensurepip --upgrade. - On distro-managed systems, install pip using the OS package manager (for example
python3-pip). - If this is a venv, recreate it: delete
.venv/and runpython3 -m venv .venv, then upgrade pip inside it. - After restoration, prefer running pip as
python -m pip ....
Why It Happens
- pip was never installed for this interpreter (common on minimal Linux installs).
- Your OS splits pip into a separate package (for example
python3-pip). - The virtual environment is broken (partial deletion, mixed system/user installs).
How to Verify
- Run
python3 -m pip --versionand confirm it works. - Re-run your original pip install command inside the intended environment.
Manual pip presence checks
- Confirm which interpreter you're using:
python3 -c 'import sys; print(sys.executable)'. - Try importing pip:
python3 -c 'import pip; print(pip.__version__)'. - If in a venv, check activation and interpreter path:
python -c 'import sys; print(sys.prefix)'.
Common CLI Output
ModuleNotFoundError: No module named 'pip'/usr/bin/python3: No module named pip How pip is packaged
- pip is a Python package that must exist in the interpreter's environment to be runnable via
python -m pip. - Some minimal Python installs omit pip, and some distributions package pip separately from Python.
- Broken virtual environments (or deleted site-packages) can also cause pip to disappear.
Prevention Tips
- Use venvs and recreate them instead of repairing them when they get corrupted.
- Standardize on a single Python distribution for a project/CI (avoid mixing system Python and custom builds).
- Prefer
python -m pipto ensure pip matches the interpreter.
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.