I recently learned that pip
does not resolve transitive dependencies in any sane fashion. This means after installing a package, some of its dependencies' dependencies may not actually be satisfied.
Is there a way to programmatically check that all installed packages' dependencies are actually satisfied after installing?
Specifically, I would like to be able to create a virtualenv, install some packages into it, and then verify that all installed packages actually have the required dependencies.
Edit: Here is an example to better illustrate the problem. Suppose package A
depends on packages B
and C
, both of which depend on package D
, possibly with different version ranges. When installing A
, pip will arbitrarily choose one of the specified version ranges for D
to satisfy. For example, B
's dependency on D
might be satisfied, but C
's required version for D
may not be satisfied. I want to detect whether such problems exist.