Issue importing azureml.core

I am suddenly running into an issue where whenever I run the line import azureml.core, even if I do not run any code using it, it spits back the following error.

Failure while loading azureml_run_type_providers. Failed to load entrypoint automl = azureml.train.automl.run:AutoMLRun._from_run_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’), {‘azureml-core’}).
Failure while loading azureml_run_type_providers. Failed to load entrypoint hyperdrive = azureml.train.hyperdrive:HyperDriveRun._from_run_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’), {‘azureml-core’}).
Failure while loading azureml_run_type_providers. Failed to load entrypoint azureml.PipelineRun = azureml.pipeline.core.run:PipelineRun._from_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’), {‘azureml-core’}).
Failure while loading azureml_run_type_providers. Failed to load entrypoint azureml.ReusedStepRun = azureml.pipeline.core.run:StepRun._from_reused_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’), {‘azureml-core’}).
Failure while loading azureml_run_type_providers. Failed to load entrypoint azureml.StepRun = azureml.pipeline.core.run:StepRun._from_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’), {‘azureml-core’}).
Failure while loading azureml_run_type_providers. Failed to load entrypoint azureml.scriptrun = azureml.core.script_run:ScriptRun._from_run_dto with exception (azure-mgmt-authorization 4.0.0 (/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages), Requirement.parse(‘azure-mgmt-authorization<4,>=0.40.0’)).

I haven’t changed anything with my packages and so I’m not super sure why this is occurring.

Updating with pip install azureml.core -U works but I get the following error

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
mltable 1.2.0 requires azureml-dataprep[parquet]<4.10.0a,>=4.9.0a, but you have azureml-dataprep 4.10.7 which is incompatible.
mlflow 2.2.2 requires pytz<2023, but you have pytz 2023.3 which is incompatible.
mlflow-skinny 2.2.2 requires pytz<2023, but you have pytz 2023.3 which is incompatible.
azureml-train-core 1.51.0 requires azureml-core~=1.51.0, but you have azureml-core 1.54.0.post1 which is incompatible.
azureml-train-automl-client 1.51.0 requires azureml-core~=1.51.0, but you have azureml-core 1.54.0.post1 which is incompatible.
azureml-telemetry 1.51.0 requires azureml-core~=1.51.0, but you have azureml-core 1.54.0.post1 which is incompatible.
azureml-sdk 1.51.0 requires azureml-core~=1.51.0, but you have azureml-core 1.54.0.post1 which is incompatible.
azureml-pipeline-core 1.51.0 requires azureml-core~=1.51.0, but you have azureml-core 1.54.0.post1 which is incompatible.
azureml-mlflow 1.49.0 requires azure-storage-blob<=12.13.0,>=12.5.0, but you have azure-storage-blob 12.15.0 which is incompatible.

Not sure what’s the best way to resolve these issues, I could upgrade all of my azureml libs across the board but unsure if that would fix.

Leave a Comment