I would like to see a list of packages that depend on a certain package with PIP. That is, given django
, I would like to see django-cms
, django-filer
, because I have these packages installed and they all have django
as dependency.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Quite straightforward:
Or the other way around: (sorry i got it wrong!)
before that set your search-string with:
essentially you have to go through the whole list and query for every single one. That may take some time.
Edit: Also it does only work on installed packages, I don't see pip providing dependencies on not installed packages.
This one, for pip older than 1.3.1 will list all packages and it's dependencies, you can parse its output with any scripting language, for
Requires ... django
inclusions:For example, following snippet:
outputs
pandas
on my system.One liner based on requirements.txt. In this example I'm looking for
funcsigs
reverse dependency, and found mock. Just changefuncsigs
by something else.I know there's already an accepted answer here, but really, it seems to me that what you want is to use pipdeptree: