You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request, I think.
It would be nice to, at least, get a list of reverse dependencies with a "pip show <package_name>" command, with a depth of 1 for an installed package.
Maybe a better approach is to create a new command, e.g. "pip graph <package_name>" to show a complete tree of dependencies of an installed package.
# rev_deps.py
import pip
import sys
def find_reverse_deps(package_name):
return [
pkg.project_name for pkg in pip.get_installed_distributions()
if package_name in {req.project_name for req in pkg.requires()}
]
if __name__ == '__main__':
print find_reverse_deps(sys.argv[1])
Thanks for your work on pip :-)
The text was updated successfully, but these errors were encountered:
lepetitchevalblanc
changed the title
"pip show" command should display reverse dependencies / pip "graph new" command
"pip show" command should display reverse dependencies / "pip graph" new command
Jan 17, 2018
Description:
This is a feature request, I think.
It would be nice to, at least, get a list of reverse dependencies with a "pip show <package_name>" command, with a depth of 1 for an installed package.
Maybe a better approach is to create a new command, e.g. "pip graph <package_name>" to show a complete tree of dependencies of an installed package.
What I've run:
As a workaround, I use this script from https://stackoverflow.com/questions/21336323/show-reverse-dependencies-with-pip:
Thanks for your work on pip :-)
The text was updated successfully, but these errors were encountered: