Preamble

Reproducible environments matter when 2019 benchmarks must be re-run months later—or when production incidents demand diffing exact dependency graphs. pip-tools separates intent from resolution: hand-maintain requirements.in, compile a fully pinned requirements.txt, pip-sync environments to match.


Workflow

  1. requirements.in — direct dependencies and coarse ranges if policy allows.
  2. pip-compile — emits pins including transitives.
  3. Commit the txt — CI and prod install from the same graph.

Contrast with Maven

Maven resolves transitively by default; pip historically needed help. pip-tools closes much of the gap without mandating Poetry—though Poetry for Dependency Management and Packaging standardizes teams on other tools when preferred.


Conclusion

Checked-in compiled requirements are architecture: they shrink “works on my machine.” Eight and Nine Queens via Backtracking in Python implements N-Queens with backtracking.