Reputation: 199
From this answer, I am able to get the dependencies of a package. However I am looking for a solution that does not require you to download and install the package.
Is this possible?
Edit: I meant getting the package dependencies from PyPI. I want to get the package dependencies from a PyPI package, but my only solution requires me to install the package, which is not what I want. Is it possible to get the package dependencies from PyPI?
Upvotes: 3
Views: 1060
Reputation: 22433
As far as I know, in many cases PyPI won't be able to deliver reliable info about the dependencies for a distribution. For example, for source distributions the list of dependencies is somewhat dynamic, and the only way to get a definitive static list of dependencies is to build the distribution (run the setup.py
). Meaning that in some cases there is no way around downloading and building the distributions locally (with the correct Python interpreter). No need to install them though.
Note:
I believe johnnydep
is a tool that does exactly that. But it doesn't answer your question as you are probably looking for a library or an API.
Upvotes: 2