Let's say I have a setuptools project that depends on
and package B depends on A, v. 2.0.
In Java I would have to exclude transitive dependencies in pom.xml
or similar. How does it work in setuptools? Can multiple versions of the same package live together in an installation?
This won't work with setuptools; you cannot override dependencies like that, for good reasons.
What you describe is a broken dependency; you'll have to resolve this manually (probably by pinning package A to v. 2.0).