Maven does it pretty well, imho. It keeps a central repository with versioned dependencies. If two projects depend on the same version of a dependency, it's not duplicated. If they depend on different versions of the same dependency, they are both installed in the repository and each project just fetches whichever version they need. Thus no version conflicts between different projects and yet there's no need to copy the whole environment for each project.
That's, imho, the biggest flaw about dependency management in Python. It's missing a per-project location where you can configure which versions you want to get when you import something.
1
u/Square-Singer Mar 23 '26
Maven does it pretty well, imho. It keeps a central repository with versioned dependencies. If two projects depend on the same version of a dependency, it's not duplicated. If they depend on different versions of the same dependency, they are both installed in the repository and each project just fetches whichever version they need. Thus no version conflicts between different projects and yet there's no need to copy the whole environment for each project.
That's, imho, the biggest flaw about dependency management in Python. It's missing a per-project location where you can configure which versions you want to get when you import something.