Azure / Azure/azure-cli

Azure CLI V2 (azure-cli-2.45.0.msi) Error 1 module to load starting with 'azext_': got []

Open
#25,473 6 comments 0 reactions 2 assignees Claimed by @bebound View on GitHub
act-codegen-extensibility-squad act-platform-engineering-squad Auto-Assign Installation Machine Learning needs-team-attention question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

Encountered the error and tried to reinstall (repair, remove, install) Azure CLI azure-cli-2.45.0.msi but kept getting same:

Terminal
(base) PS C:\Users\DirName> az version
The command failed with an unexpected error. Here is the traceback:
Expected 1 module to load starting with 'azext_': got []
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 517, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/__init__.py", line 426, in load_command_table
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/__init__.py", line 320, in _update_command_table_from_extensions
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/__init__.py", line 307, in _filter_modname
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/__init__.py", line 308, in get_extension_modname
AssertionError: Expected 1 module to load starting with 'azext_': got []
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

How did I get there?
I was tring to install azure-cli-ml exension and it corrupted the Azure CLI.

[Install and set up the CLI (v2) - Azure Machine Learning | Microsoft Learn](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-configure-cli?tabs=public)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.