What's the problem this feature will solve?
In the context of building a Python Distrubution, I suffer a lot to understand and manage dependancies and version contraints.
Recently, I fell on pipdeptree and it blew my mind per :
Describe the solution you'd like
today, when I want to know what package is use by what:
. pipdeptree
. pipdeptree -r
. I'm interested in its internal access (not command line) and json output options, as simplifying work to try build a simple GUI over pip...
Alternative Solutions
continue to use pipdeptree, if pip doesn't evolve
Additional context
Maintaining WinPython, while trying to have its "specifics weight" smaller and smaller (relying more and more on standard pip, standard pypi, ...)
There's also pipgrip (see https://github.com/pypa/pip/issues/988#issuecomment-572797302) which can show the dependency graph. However, as mentioned in the linked issue, the dependency relationships made by pip
is not yet correct (at least not by default, proper dependency resolution will be out soon this year I hope), so for now you might want to stick with your current solution. BTW there are many cool features depending on proper resolution (batch upgrade, autoremove, etc.) that I can't wait to see!
Edit: did not see GH-8076. Also I looked it up and found GH-4968 asking for the opposite feature of pipdeptree
too.
just feeded the idea pipeline, hope it wheel help.
I do like the idea. Something like pip list --tree
might work, although we鈥檒l need to think of a way to express broken dependencies.
It might also be a useful feature to show a (partial) tree when a pip install
call succeeds. I think one of NPM and Yarn does this, or do they both? But JavaScript dependencies are nested, so we鈥檒l need to change the format somewhat to fit Python鈥檚 dependency model.
@ei8fdb FYI
Out of this discussion on _pipdeptree_, as some kind of challenge, I eventually wrote deptree. It might be of interest to those looking for this kind of feature.
Anyway, since _pipdeptree_ already uses _pip_'s internal private APIs it could be a good fit to get parts of it integrated into _pip_.
This feature is a must. pipdeptree does it perfectly. Just merge their code in.
Most helpful comment
HAI
Can we come up a
pip inspect
command to replace check, list, show and freeze?Then it can have a
--tree
option, and I'll be a happy kiddo.KTHXBYE