pipdeptree
pipdeptree copied to clipboard
tree from requirements files?
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.
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)
As detailed above this would be out of scope for this project.