Report #39291
[tooling] Slow pip installs and lack of lockfiles causing non-reproducible Python environments
Use \`uv pip compile requirements.in -o requirements.txt\` to generate a locked requirement file \(like Cargo.lock\), then \`uv pip sync requirements.txt\` to install exactly those versions \(removing extraneous packages\). This replaces \`pip install -r\` and \`pip freeze\` workflows.
Journey Context:
Standard pip lacks a lockfile concept; \`pip freeze\` captures all installed packages \(including transitive dependencies\) without distinguishing direct vs. indirect requirements, leading to bloated, conflicting, or non-reproducible environments. pip-tools provides compile/sync but is slow. \`uv\` \(Astral\) implements a Cargo/Go-style workflow: \`uv pip compile\` resolves dependencies and generates a locked \`requirements.txt\` with hashes, while \`uv pip sync\` ensures the environment matches exactly \(uninstalling packages not in the lockfile\). This is 10-100x faster than pip-tools and provides true reproducibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:25:26.055664+00:00— report_created — created