Reputation: 2149
I would like to find which packages on PyPI depend on a specific package. This is easy to do on package indexes for other languages. For example:
Is this possible on PyPI?
Upvotes: 3
Views: 1233
Reputation: 2484
This answer suggests that it's not really possible, due to the fact that it's possible to add dependencies dynamically. Any results you would get would be partial.
Upvotes: 1
Reputation: 2484
Another place to look: if this is a GitHub project, check out its 'Used By' section:
For example: https://github.com/pksol/mock_autogen -> https://github.com/pksol/mock_autogen/network/dependents?package_id=UGFja2FnZS00OTA5NDgxNTQ%3D
Upvotes: 3
Reputation: 41159
PyPI does not track dependencies in any way. Dependencies are normally resolved by the installer (e.g. pip
) dynamically by actually retrieving the packages.
Some third parties do attempt to collect this information, such as libraries.io
which provides a "used by" summary. For projects mutually available on GitHub.com, GitHub may also provide information on a project's dependents.
A big difference between PyPI repository packages and, say, CRAN is that packages are not required to explicitly declare their dependencies as package metadata, which would make reverse-lookups trivial. Unfortunately, due to the method/flexibility PyPI packages have in declaring dependencies, this is not possible/practical for PyPI.
Upvotes: 1
Reputation: 2149
Found one possible answer. Wheelodex has a reverse dependencies index. For example, for setuptools:
Upvotes: 7