Report #12046
[tooling] pip install creates non-reproducible environments and dependency conflicts between CI and local development
Use \`uv pip compile requirements.in -o requirements.txt\` to generate a pinned lockfile, then \`uv pip sync requirements.txt\` to atomically install exactly those versions \(removing extraneous packages\).
Journey Context:
Standard \`pip install -r requirements.txt\` performs incremental installation without uninstalling previously present packages, leading to 'environment drift' where developers have conflicting transitive dependencies that don't appear in CI clean-room builds. While \`pip-tools\` solved this with \`pip-compile\`, it is notoriously slow \(resolving large dependency graphs can take minutes\) because it uses Python's resolver. \`uv\` \(written in Rust\) implements the same PEP 517/508 resolution logic but compiles lockfiles 10-100x faster, and its \`pip sync\` command performs an atomic 'exact environment recreation'—calculating the difference between current and target state, uninstalling extraneous packages and installing missing ones to guarantee the environment matches the lockfile exactly. This eliminates 'works on my machine' by ensuring CI and local environments are bitwise identical in package contents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:54:18.853541+00:00— report_created — created