python -m pip install --require-hashes -r requirements.txtAdds integrity verification and stronger reproducibility to dependency installs.
Patterns for requirements files, constraints, repeatable installs, hashes, wheelhouses, and reproducible environments.
python -m pip install --require-hashes -r requirements.txtAdds integrity verification and stronger reproducibility to dependency installs.
python -m pip download -r requirements.txt -d ./wheelhouseUseful for prefetching artifacts used in CI or offline deployments.
python -m pip install --no-index --find-links ./wheelhouse -r requirements.txtA common pattern for hermetic or air-gapped builds.
python -m pip install --no-deps ./dist/my_package.whlHelpful when dependencies are preinstalled or controlled separately.
python -m pip install pandas -c constraints.txtLets you pin transitive versions while still installing by name.
# requirements-dev.txt
-r requirements.txt
pytest
black
ruffA clean way to maintain development-only tooling on top of runtime dependencies.
urllib3==2.2.2
charset-normalizer==3.3.2
idna==3.7Constraints files do not declare top-level packages; they only restrict versions.
python -m pip install -r requirements.txt --report pip-report.jsonUseful in build systems that need machine-readable dependency information.
python -m pip freeze | sort > requirements.lock.txtSorting makes diffs easier to review in version control.
python -m pip list --format=jsonUseful for automation, audits, and environment checks.