Listing the dependencies of a package using pip

Question:

How do I list the dependencies for a package using pip?

Asked By: jan

||

Answers:

Note that this answer from 2012 is out of date. First, the workaround, which the answer already said you probably shouldn’t do in 2012, now you can’t do it. If you want a similar workaround, you could use pip download, but it’s even less likely to be what you want. Especially since pip show has been improved. Fortunately, the question has been marked as a dup of a later question, so there’s no reason to read this answer except for historical purposes.


You can’t, at least not directly.

You can import the pip module in your own code and download the requirements file and then iterate through it. Or, from the command line, you can pip install --no-install --verbose.

But really, unless this is something you need to automate, it’s probably easier to just go to http://pypi.python.org/ and search for the package there instead of using pip.

Answered By: abarnert

In current pip (version 1.3.1) you can see the dependencies of an installed package by using:

pip show <package>
Answered By: kdb
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.