How does PIP determine the version of a dependency of multiple dependents

后端 未结 2 761
刺人心
刺人心 2021-01-24 13:06

Let\'s assume we have the following dependency tree in Python using PIP as package installer:

A==1.2.1:
|  - B==1.5.4
|  - C==?.?.?

D==1.3.0:
|  - C==?.?.?
         


        
2条回答
  •  不知归路
    2021-01-24 13:36

    When pip installs a package, it automatically installs any dependent Python packages without checking if these conflict with previously installed packages. It will install a package and any of its dependencies regardless of the state of the existing installation. Because of this, a user with a working installation of, for example, Google Tensorflow, can find that it stops working having used pip to install a different package that requires a different version of the dependent NumPy library than the one used by Tensorflow. In some cases, the package may appear to work but produce different results in detail.

    Anaconda (Python distribution) - Wikipedia

提交回复
热议问题