Python venv Troubleshooting Cheat Sheet/Use python -m pip for installs

Avoid ambiguity by tying pip to the active interpreter.

Section: Wrong interpreter or pip

Use python -m pip for installs

bash
bash
python -m pip install -r requirements.txt
Explanation

This is a best practice when multiple Python installations are present.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Wrong interpreter or pip
Find pip on POSIX
See which pip binary your shell resolves first.
OpenIn sheetbashsame section
Find python on POSIX
See which python binary your shell resolves first.
OpenIn sheetbashsame section
Use command -v for python
Portable shell check for command resolution.
OpenIn sheetbashsame section
Print sys.executable
Verify the exact interpreter the shell is using.
OpenIn sheetbashsame section
Install bundled pip
Bootstrap pip into the current interpreter or venv.
OpenIn sheetbash1 tag match
Reinstall pip packaging tools
Refresh core package tooling in the venv.
OpenIn sheetbash1 tag match