Is it possible to show the reverse dependencies with pip
?
I want to know which package needs package foo
. And which version of foo
is needed by this package.
Is it possible to show the reverse dependencies with pip
?
I want to know which package needs package foo
. And which version of foo
is needed by this package.
This is possible for already installed packages using pip's python API. There is the
pip.get_installed_distributions
function, which can give you a list of all third party packages currently installed.This script will output the list of packages, that require a specified one:
I found Alexander's answer perfect, except it's hard to copy/paste. Here is the same, ready to paste:
To update the answer to current (2019), when
pip.get_installed_distributions()
does not exist anymore, usepkg_resources
(as mentioned in a comments):