Yes exactly, like if I know my app needs the requests library, I will just put that in requirements.in but after compile requirements.txt will include the exact version of requests and every version of each dependency. So that every time pip install is run, all dependencies are always the same despite what happens upstream





























Well if the
requirements.txtis pinned to a specific version of a dependency of a dependency, you might not know or really care why that’s set. But then this becomes a nightmare and dependency hell laterif you want a newer version of some package, and that newer version requires a bunch of newer packages and loses the others. At that point you probably will toss your old file and start a new one from scratch piecing together all the requirements with likepip freezein a new virtual environment.Sure you could omit the versions, but then everytime you deploy, you don’t know what you’re going to get and a deployment today would be very different next week with a whole bunch of different versions of dependencies.