How Does Pip Determine The Version Of A Dependency Of Multiple Dependents
Solution 1:
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.
Solution 2:
On this topic, things will change relatively soon. Since pip's developers are currently working on a new dependency resolver:
To test it today, you might want to install pip 20.2b1 and enable the unstable feature "resolver", with for example either one of the following:
PIP_UNSTABLE_FEATURE=resolver python -m pip install SomeProject
python -m pip --unstable-feature=resolver install SomeProject
See the following link for more details:
Other references:
- http://www.ei8fdb.org/thoughts/2020/05/test-pips-alpha-resolver-and-help-us-document-dependency-conflicts/
- https://pradyunsg.me/blog/2020/03/27/pip-resolver-testing/
- https://www.pythonpodcast.com/pip-resolver-dependency-management-episode-264/
Updatepip 20.2
Post a Comment for "How Does Pip Determine The Version Of A Dependency Of Multiple Dependents"