The myth that pip install -r requirements.txt creates a reproducible environment is the single most common cause of "it works on my machine" bugs in data engineering pipelines.
Why this matters: In regulated data environments, non-deterministic builds are a compliance risk. If you cannot guarantee exactly which sub-dependency versions were installed in your production container, you cannot guarantee the integrity of your data processing logic.
The problem with loose requirements
When you define dependencies in a requirements.txt file using loose versioning (e.g., pandas>=2.0.0 ), pip resolves the environment at build time . If you rebuild that same image two weeks later, pip may fetch newer versions of sub-dependencies, resulting in a different runtime environment than the one you tested.…