Pip installation is stuck in an infinite loop if there are unresolvable conflicts in dependencies. To reproduce, pip==20.3.0
and:
pip install pyarrow==2.0.0 azureml-defaults==1.18.0
Unfortunately, pip makes no attempt to resolve dependency conflicts. For example, if you install two packages, package A may require a different version of a dependency than package B requires. Pip can install from either Source Distributions (sdist) or Wheel (. whl) files.
Pip will not flag dependency conflicts. As a result, it will happily install multiple versions of a dependency into your project, which will likely result in errors. One way to avoid dependency conflicts is to use an alternative Python package manager, like conda, poetry or ActiveState's State Tool.
Backtracking reduces the risk that installing a new package will accidentally break an existing installed package, and so reduces the risk that your environment gets messed up. To do this, pip has to do more work, to find out which version of a package is a good candidate to install.
Once pip has a list of compatible distributions, it sorts them by version, chooses the most recent version, and then chooses the "best" distribution for that version. It prefers binary wheels if there are any, and if they are multiple it chooses the one most specific to the install environment.
Workarounds:
Local environment: Downgrade pip to < 20.3
Conda environment created from yaml: This will be seen only if conda-forge is highest priority channel, anaconda channel doesn't have pip 20.3 (as of now). To mitigate the issue please explicitly specify pip<20.3 (!=20.3 or =20.2.4 pin to other version) as a conda dependency in the conda specification file
AzureML experimentation: Follow the case above to make sure pinned pip resulted as a conda dependency in the environment object, either from yml file or programmatically
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With