I am having a dependency resolution in my project that I suspect is related to package X, which I do not use but I believe is a transitive dependency of something in my project dependencies.
I want to see what in my project depends, indirectly or directly, on package X. How do I do that?
I tried pipdeptree, but it appears to require that the packages in question be installed first. However Pip can’t resolve my project dependencies, so I can’t do that!
Is there another tool that can, say, walk through my project deps one at a time, build a dep tree from each, and then let me search the results?
It turns out that pip-compile from Pip Tools was able to resolve dependencies, and the resulting “locked” requirements file contains comments stating which requirement in my project depends on each item in the file.
In my case I was trying to figure out why aiobotocore was being included, and it turns out that s3fs requires it:
aiobotocore==3.1.1
# via
# -c constraints_arm64.txt
# s3fs
I do wonder if other tools can do this, so I invite other answers.
Although I think it’s worth documenting, I think we need to restructure the docs as a first step.
We’re currently building a big monolithic page from the readme, and I’d like to have more pages to break things apart – this would be good in a use-case gallery. I’ll open a discussion for us.
I wonder why we’re able to get a resolution with pip-compile if pip was failing. @gwerbin, if you’re willing and able to share details of the pip failure – like the input requirements and your pip and python versions – I’d be curious to take a look. There’s no guarantee that I’d have any useful insights, of course.
Thanks for the offer! I assume you’re a Pip Tools contributor. I’d be happy to share but not on a public forum. It looks like there’s a direct message here so I can follow up there.
Pip Tools has been a core part of my workflow for many years in at least 2 jobs. I am very grateful for it.