Are you using freeze to build your requirements file? I had spotted some time ago that this method often created longer lists than needed. Later I found out that it may include libraries that where once installed but not needed anymore, or that are used in other projects. Since bookworm and the (almost) mandatory use of virtual environments this may be less of problem in the future. Anyway, I use pipreqs since a long time now to build the requirements files. They say this on their page:
And further, I always tend to use the most recent versions of any library whenever possible.Why not pip freeze?
pip freeze only saves the packages that are installed with pip install in your environment.
pip freeze saves all packages in the environment including those that you don’t use in your current project (if you don’t have virtualenv).
and sometimes you just need to create requirements.txt for a new project without installing modules.
Statistics: Posted by kheylen25 — Tue Apr 01, 2025 12:36 pm