This has been one of my biggest annoyances working with Python and pip when dealing with projects where that are not meant to be installed as a package, how do you handle dependencies?Think projects like application backends, python scripts, REST APIs etc If you’ve ever struggled with this, you’re going to love this: a PR by Sebastian Höffner opened #13895 will add a new global flag to pip such that you can directly install any dependencies in your pyproject.toml without installing the package itself.pip install --only-deps .This is going, for me at least, be a huge boost in the way that I manage and distribute my projects on servers. Vastly simplifying poor manual workarounds that have built up over years.Since it’s been more than a decade in the making, let’s cover the history of poor Python souls stuck trying to figure out how to install dependencies for their scripts or apps. Requirements.txt? python -m pip freeze [options] Pip freeze is the classic sure fire first step towards reproducibility documenting exactly which package versions you have installed down to the specific version number. You can then recreate any environment! env1/bin/python -m pip freeze > requirements.txt env2/bin/python -m pip install -r requirements.txt Pip freeze exports all dependencies (including dependencies of dependencies) These dependencies are quite unique to your environment and hardward. Attempting to install from freeze quickly breaks down when you recreate environments on other machines. Different Python versions, OS versions, libraries or machine hardware end up with different requirements of package versions (and full packages as well). Cut the == off This is my oldest memory of working around the issue, it certainly wasn’t the best, but I clearly remembering keeping this around for when I needed it 15 years ago:pip freeze --local | grep -v '^\-e' | cut -d = -f 1For me, and likely much earlier others, this sometimes morphed into just manually adding the list of dependencies ...
First seen: 2026-07-23 06:57
Last seen: 2026-07-23 22:10