Azure / Azure/azure-cli-extensions

CLI breaks when installing ML extension

Open
#8,929 2 comments 0 reactions 0 assignees View on GitHub
Auto-Assign bug customer-reported extension/ml Machine Learning Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

CLI breaks with this error:
```https://docs.microsoft.com/en-US/cli/azure/extension#az_extension_add
Read more about the command in reference docs
No module named 'msrestazure'
cannot import name 'FieldInstanceResolutionError' from 'marshmallow.utils' (/opt/az/azcliextensions/ml/marshmallow/utils.py)
+ az ml online-endpoint create --subscription f3494638-317a-4310-99bd-289ca34aa332 --resource-group mai-custom-eastus2_rg --workspace-name mai-custom-eastus2_ws --name yolophi3p5-0-highlight-flight -f generated/subscription-prometheus-wincop/eastus2/yolophi3p5-0-highlight-flight/endpoint-yolophi3p5-0-highlight-flight.yml
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
WARNING: Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
WARNING: Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
ERROR: 'ml' is misspelled or not recognized by the system.```

### Related command

az extension add -n ml -y
az ml -h # returns error

### Errors

No module named 'msrestazure'
cannot import name 'FieldInstanceResolutionError' from 'marshmallow.utils' (/opt/az/azcliextensions/ml/marshmallow/utils.py)
ERROR: 'ml' is misspelled or not recognized by the system.

### Issue script & Debug output

```cannot import name 'FieldInstanceResolutionError' from 'marshmallow.utils' (/opt/az/azcliextensions/ml/marshmallow/utils.py)
+ az ml online-endpoint create --subscription f3494638-317a-4310-99bd-289ca34aa332 --resource-group mai-custom-eastus2_rg --workspace-name mai-custom-eastus2_ws --name yolophi3p5-0-highlight-flight -f generated/subscription-prometheus-wincop/eastus2/yolophi3p5-0-highlight-flight/endpoint-yolophi3p5-0-highlight-flight.yml
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
WARNING: Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
WARNING: Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
ERROR: 'ml' is misspelled or not recognized by the system.

Examples from AI knowledge base:
az extension add --name anextension
Add extension by name

az extension list-available
List all publicly available extensions

https://docs.microsoft.com/en-US/cli/azure/extension#az_extension_add
Read more about the command in reference docs
No module named 'msrestazure'```

### Expected behavior

No error

### Environment Summary

azure-cli 2.75.0

core 2.75.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1
ml 2.35.0
storage-preview 1.0.0b6

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

### Additional context

_No response_

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.