pipdeptree icon indicating copy to clipboard operation
pipdeptree copied to clipboard

tree from requirements files?

Open hemna opened this issue 3 years ago • 1 comments

I am having a problem resolving conflicting versions of packages from several requirements.txt files needed to setup a venv. Is there a way to use pipdeptree to show the dep tree from a list of requirements.txt type files?

so for pip I run something like pip install -r requirements.txt -r test-requirements.txt -r http://other-repo/global-requirements.txt -r http://another/upper-constraints.txt

would be nice to run pipdeptree and pass all of those files in and get a dump of the reqs and what file each of the req comes from to help track down the conflicts.

hemna avatar Jan 27 '21 17:01 hemna

Hi,

pipdeptree can't use requirement files as input as it's not a dependency resolver and completely relies on pip for the list of dependencies. So it can only be used after the packages are installed in an environment.

Have you tried using the new version of pip with improved dependency resolver? It may not meet your exact requirements but I think it should be able to prevent conflicting packages from getting installed.

You may also check pipgrip, poetry (I am not quite familiar with them though)

naiquevin avatar Jan 29 '21 13:01 naiquevin

As detailed above this would be out of scope for this project.

gaborbernat avatar Sep 05 '22 03:09 gaborbernat