compatibility issues between azure-core and azure-cli: cannot import name 'case_insensitive_dict' from 'azure.core.utils'
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Related command
Describe the bug We are noticing compatibility issues between azure-core and azure-cli: cannot import name ‘case_insensitive_dict’ from ‘azure.core.utils’. Until cli 2.37.0, AZ CLI had the dependency azure-core==1.21.1 Starting 2.38.0, AZ CLI is having dependency azure-core==1.24.0
In case, we install a package that has a direct or indirect dependency on the lower azure-core==1.21.1, the AZ CLI encounters the compatibility issues between azure-core and azure-cli and emits the error: cannot import name ‘case_insensitive_dict’ from ‘azure.core.utils’
To Reproduce Two ways of reproducing the issue:
- Install latest az cli
- Install any package that depends on lower older version of azure-core
or
- Install az cli (2.37.0 or lower)
- Install cli ML extension 2.5.0. (ML Extension brings in the latest azure-storage-blob package that depends on latest azure-core=1.24.0). az extension add --name ml --version 2.5.0
Expected behavior CLI should not fail.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
can't import installed azure.core module - Stack Overflow
First, you should not need "azure-core" to use this method on a compute client, I created an issue for that: ...
Read more >credentials Module - azure-common - Microsoft Learn
For compatible azure-cli-core version (< 2.20.0), credentials will be the "az login" command: https://docs.microsoft.com/cli/azure/authenticate-azure-cli.
Read more >azure-cli-core - Python Package Health Analysis - Snyk
Microsoft Azure Command-Line Tools Core Module For more information about how to use this package see README · Ensure you're using the healthiest...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We are also seeing this on az cli 2.37.0 and the latest version (0.5.92) of aks-preview extension.
https://dev.azure.com/AzureContainerUpstream/Azure Workload Identity/_build/results?buildId=52370&view=logs&j=3a3ff92c-2ab0-5cd5-ecad-e283f5e1d802&t=6d5f3379-e684-5896-70a5-701deb97a928
Pinning aks-preview to 0.5.87 resolved it.
Hi, Is the issue is resolved? I’m also facing the same issue while importing a package. Currently My azure-core is a version of 1.26.0 so while executing the module using this version of azure-core it throws me an error
So here by observing the error I get to know that module requires an azure-core of version <=1.22.1. So if downgrade the version to 1.22.1 or less than that, then I’m facing an error
did anyone have the solution how to resolve the error and successfully import the module?