Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.01k stars 2.49k forks source link

Incompatible versions of azureml-core and azure-cli-core in python 3.10 #1818

Closed jzazo closed 1 year ago

jzazo commented 1 year ago

Hi. I am trying to install azureml-core and azure-cli-core in the same environment with python 3.10. I cannot find two compatible versions of both packages. If I pin the packages to latest versions I get the following error:

Because no versions of azureml-core match >1.45.0.post1,<2.0.0 and azureml-core (1.45.0.post1) depends on knack (>=0.9.0,<0.10.0), azureml-core (>=1.45.0.post1,<2.0.0) requires knack (>=0.9.0,<0.10.0).
And because azure-cli-core (2.40.0) depends on knack (>=0.10.0,<0.11.0) and no versions of azure-cli-core match >2.40,<3.0, azureml-core (>=1.45.0.post1,<2.0.0) is incompatible with azure-cli-core (>=2.40,<3.0).
So, because immunocam-app depends on both azure-cli-core (^2.40) and azureml-core (^1.45.0.post1), version solving failed.

Can you unpin or upgrade the knack dependency in azureml-core since it uses the oldest version?

Also, older versions of azureml-core depend on old ruaml-yaml versions which do not provide wheels for python 3.10.

Can you help find a solution? Thank you.

jzazo commented 1 year ago

Hi again. I will provide reproducible example:

This is minimum pyproject.toml to use with poetry:

[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
azure-cli-core = "^2.40.0"
azureml-core = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

To reproduce, activate the environment and run poetry lock. You will see that there is no version of azureml-core compoatible with azure-cli-core. This is because you have an upper pin in knack. Can you please update that dependency and not upper bound it?

Thank you.

jzazo commented 1 year ago

I have not observed this problem anymore in later versions. Will reopen if I encounter them again. Thanks.