3 ms·
So with Python dependency management 'there is more than one way to do it': pip, pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, egg, uv
by thesuperbigfrog 2y ago
So with Python dependency management 'there is more than one way to do it':
pip, pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, egg, uv, ActiveState platform, homebrew, your operating system's package manager, and many others . . .
Relevant xkcd: https://xkcd.com/1987/ https://xkcd.com/1987/
- zahlman 2y agoOf the list you offer, only Poetry, Hatch, PDM and Uv actually do "Python dependency management" - in the sense of offering an update command to recalculate locked versions of dependencies, a wrapper to install or upgrade those dependencies, and a wrapper to keep track of which environment they'll be installed into. pipenv, micropipenv and pip-tools are utilities for creating records of dependencies, but don't actually "manage" those dependencies in the above sense. Your list also includes an installer (Pip), a build backend (Setuptools - although it has older deprecated use as something vaguely resembling a workflow tool similar to modern dependency managers), a long-deprecated file format (egg) which PyPI hasn't even accepted for a year and a half (https://packaging.python.org/en/latest/discussions/package-formats/ https://packaging.python.org/en/latest/discussions/package-f...), two alternative sources for Python itself (ActiveState and homebrew - and I doubt anyone has a good reason to use ActiveState any more), and two package management solutions that are orthogonal to the Python ecosystem (Conda - which was created to support Python, but its environments aren't particularly Python-centric - and Linux system package managers). Any system can be made to look complex by conflating its parts with other vaguely related but ultimately irrelevant objects.
- pepa65 2y agoYou seem to know a lot about it, but you're really just reinforcing the point.
- zahlman 2y agoI don't see how. There aren't as many options as GP represents, because most of the things in the list are simply non sequitur.
- thesuperbigfrog 2y agoWhat do you think is the best way to manage Python dependencies and why?
- zahlman 2y agoMy entire point is that there is no best way, because people have varying needs and preferences and aesthetic senses. In my opinion, the best state of the ecosystem involves having a single integrated tool for users (it creates venvs and installs libraries and applications to them, and runs applications in temporary venvs) plus multiple small Unix-philosophy tools for developers, to do the individual tasks they need done. There can be choices for each of these - especially for build backends (PEP 517 was designed specifically to enable competition there). In this world, people could still have all-in-one workflow tools - which mainly just integrate smaller pieces.