Section: Prefer python -m pip

Confirm interpreter path

bash
bash
python -c "import sys; print(sys.executable)"
Explanation

Useful before installing packages so you know where they will land.

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 Prefer python -m pip
Use pip with Python 3 explicitly
Install a package with a specific interpreter family.
OpenIn sheetbashsame section
Use pip with a specific Python version
Install into Python 3.11 specifically.
OpenIn sheetbashsame section
Create venv and install packages
Typical Unix-like local development flow.
Upgrade pip, setuptools, and wheel
Bootstrap common packaging tools in CI.
Install requirements into an active venv
Install project dependencies after activation.
Run without prompts
Disable interactive prompts for automation.