Skip to content

CLI breaks when installing ML extension #8929

@ridashahid99

Description

@ridashahid99

Describe the bug

CLI breaks with this error:

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botMachine LearningService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.extension/ml

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions