pip install behaviour on ">=" dependency tree

Viewed 39

In my team, we have a complex dependencies tree. Some "base-packages" are required in different versions in "top-level" packages. For example, let's say we have:

  • The base-package x, latest version 1.5.1.
  • The repo my-service, that requires (inside requirements.txt):
    • Package x>=1.3.5.
    • Package a, that reuires x>=1.3.2,
    • Package b, that reuires x>=1.3.7,
    • Package c, that reuires x>=1.4.0.

Questions:

  1. When we run pip install -r requirements.txt, what version of x will be installed? (the reason im not validating this myslef is that our situation is currenlty more complex and not as descibed here).
  2. It is easy to see that the minimal required version for my-service is x==1.4.0. Can we pass some sort of flag to pip in order to tell it to install x==1.4.0 and not x==1.5.1 (latest?)

Thanks.

0 Answers
Related