Install a requirements file
Install project dependencies from requirements.txt.
python -m pip install -r requirements.txtStandard setup command for many Python apps.
Package installation, requirements, editable installs, wheel workflows, and dependency troubleshooting inside Python virtual environments.
Install and snapshot dependencies consistently.
Install project dependencies from requirements.txt.
python -m pip install -r requirements.txtStandard setup command for many Python apps.
Install a second requirements file for dev-only tools.
python -m pip install -r requirements-dev.txtCommon when separating runtime and developer tooling.
Freeze the current environment to a file.
python -m pip freeze > requirements.txtCaptures exact package versions in pip format.
Diff the current environment snapshot against a file.
diff -u requirements.txt <(python -m pip freeze)Useful on bash/zsh to see dependency drift quickly.
Install a package while skipping dependency resolution.
python -m pip install --no-deps mypackageUseful in controlled builds or when debugging dependency issues.
Require pinned hashes during install.
python -m pip install --require-hashes -r requirements.txtStricter installs for reproducibility and integrity checks.
Develop libraries and applications locally within a venv.
Install the current project in editable mode.
python -m pip install -e .Common for local development so changes are reflected without reinstalling.
Install development extras from pyproject or setup metadata.
python -m pip install -e ".[dev]"Convenient when your project defines optional development dependencies.
python -m pip install dist/my_package-0.1.0-py3-none-any.whlUseful for testing built artifacts in a clean environment.
python -m pip install dist/my_package-0.1.0.tar.gzUseful when validating source distribution packaging.
Prepare or reuse package artifacts without live internet installs.
Create wheel artifacts for dependencies.
python -m pip wheel -r requirements.txt -w ./wheelhouseBuilds or downloads wheel files into a local directory for faster later installs.
Install using local artifacts and no package index.
python -m pip install --no-index --find-links=./wheelhouse -r requirements.txtUseful for offline environments or repeatable deployments.
python -m pip cache dirGood starting point when troubleshooting repeated downloads or cache bloat.
python -m pip cache purgeUseful when stale cache state may be causing confusion.
Figure out why an environment behaves differently than expected.
Display metadata and install location for a package.
python -m pip show urllib3Use this to confirm whether a package is installed in the active venv versus a base interpreter.
python -m pip list --outdatedUseful when planning upgrades or security remediation.
python -m pip debugHelpful when debugging platform tags, config, or install behavior.
python -c "import sys; print('
'.join(sys.path))"Useful when imports succeed or fail unexpectedly due to path order.
Check the version of an imported module at runtime.
python -c "import requests; print(requests.__version__)"Confirms which version is actually importable in the active venv.