Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az ml : 'ml' is misspelled or not recognized by the system #21390

Closed
migdaepp opened this issue Feb 22, 2022 · 12 comments
Closed

az ml : 'ml' is misspelled or not recognized by the system #21390

migdaepp opened this issue Feb 22, 2022 · 12 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Machine Learning az ml needs-author-feedback More information is needed from author to address the issue.

Comments

@migdaepp
Copy link

I'm trying to update a model that was deployed with az ml.
When I run any command starting with az ml (e.g. az ml -h) I now get the error:

Error loading command module 'network': No module named 'azure.core.rest'
cannot import name 'ARMChallengeAuthenticationPolicy'
'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

I am using the following versions:
az version

{
"azure-cli": "2.33.1",
"azure-cli-core": "2.33.1",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ml": "2.1.2"
}
}

az extension list

[
{
"experimental": false,
"extensionType": "whl",
"name": "ml",
"path": "/opt/az/extensions/ml",
"preview": true,
"version": "2.1.2"
}
]

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group labels Feb 22, 2022
@ghost ghost assigned zhoxing-ms Feb 22, 2022
@ghost ghost added this to the Backlog milestone Feb 22, 2022
@ghost ghost added CXP Attention This issue is handled by CXP team. Machine Learning az ml labels Feb 22, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 22, 2022

route to CXP team

@yonzhan yonzhan removed ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot labels Feb 22, 2022
@yonzhan yonzhan removed this from the Backlog milestone Feb 22, 2022
@SubhashVasarapu-MSFT SubhashVasarapu-MSFT self-assigned this Feb 23, 2022
@harneetvirk
Copy link

This seems like an issue with the dependency of azure-core in azure-cli that does not contains azure.core.rest. azure.core.rest is the new public simple HTTP library in azure.core introduced in azure-core 1.20.0
A similar issue (No module named 'azure.core.rest') has been reported here: Azure/azure-cli-extensions#4462

@SubhashVasarapu-MSFT SubhashVasarapu-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Mar 2, 2022
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Mar 9, 2022
@ghost
Copy link

ghost commented Mar 9, 2022

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Mar 24, 2022
@ghost ghost removed the no-recent-activity There has been no recent activity on this issue. label Jun 21, 2022
@adba-msft
Copy link
Member

Upgrading the Az CLI fixed this issue.

PS C:\Users\user> az --version
azure-cli                         2.37.0

core                              2.37.0
telemetry                          1.0.6

Extensions:
azure-devops                      0.18.0
ml                                 2.5.0

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\user\.azure\cliextensions'

Python (Windows) 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 22:57:10) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
PS C:\Users\user> az ml -h

Group
    az ml : Manage Azure Machine Learning resources with the Azure CLI ML extension v2.
        Install Azure CLI ML extension v2
        https://docs.microsoft.com/azure/machine-learning/how-to-configure-cli.

Subgroups:
    batch-deployment               : Manage Azure ML batch deployments.
    batch-endpoint                 : Manage Azure ML batch endpoints.
    component                      : Manage Azure ML components.
    compute                        : Manage Azure ML compute resources.
    connection           [Preview] : Manage Azure ML workspace connection.
    data                           : Manage Azure ML data assets.
    dataset [Deprecated] [Preview] : Manage Azure ML dataset assets.
    datastore                      : Manage Azure ML datastores.
    environment                    : Manage Azure ML environments.
    job                            : Manage Azure ML jobs.
    model                          : Manage Azure ML models.
    online-deployment              : Manage Azure ML online deployments.
    online-endpoint                : Manage Azure ML online endpoints.
    workspace                      : Manage Azure ML workspaces.

To search AI knowledge base for examples, use: az find "az ml"

Please let us know how we are doing: https://aka.ms/azureclihats
PS C:\Users\user>

@kavyadevd
Copy link

The error can be resolved by installing the extension using the following command:
az extension add -n azure-cli-ml

see this

@natasha-savic-msft
Copy link

I had a similar issue and had to switch python to a higher version via conda activate azureml_py310_sdkv2 . Then, re-install the az ml v2 sdk via:
az extension remove -n ml
az extension add -n ml

And finally check with: az ml -h

@maciejskorski
Copy link

maciejskorski commented Aug 30, 2022

The error can be resolved by installing the extension using the following command:
az extension add -n azure-cli-ml

Is the extension azure-cli-ml an alternative to ml


  • WARNING: *
  • Extension "azure-cli-ml" cannot be used along with extension "ml". This may result in unexpected behaviour.*
  • Please remove azure-cli-ml extension by running "az extension remove -n azure-cli-ml *

@rui-ren
Copy link

rui-ren commented Jul 18, 2023

For Linux users, you can use blow command to install az ml

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash 
az extension add -n ml -y

@wenqian157
Copy link

wenqian157 commented Dec 14, 2023

still same issue. in the end I used az 2.55.0, remove ml v1 and ml v2:
az extension remove -n azure-cli-ml
az extension remove -n ml
and reinstall ml v2:
az extension add -n ml
it works for me. ml version 2.22.0

@saikrishna-1996
Copy link

It is not working for me.

az extension add -n ml

Default enabled including preview versions for extension installation now. Disabled in May 2024. Use '--allow-preview true' to enable it specifically if needed. Use '--allow-preview false' to install stable version only. 
An error occurred. Pip failed with status code 1. Use --debug for more information.

@bwaanders
Copy link

bwaanders commented Apr 9, 2024

Encountering similar issue.

az upgrade --yes
az extension list-available --output table
az extension add -n ml --yes
az extension list-available --output table
az ml -h 

After extension add and listing the extension it states

Name                            Version    Summary                                                                                                            Preview    Experimental    Installed
ml                              2.25.0     Microsoft Azure Command-Line Tools AzureMachineLearningWorkspaces Extension                                        False      False           True

But when running

az ml -h

Logs show

ERROR: 'ml' is misspelled or not recognized by the system.

Any idea what is going on here?

@Cameron-oos
Copy link

I have the same error. When I use: az extension add --name ml

Error: An error occurred. Pip failed with status code 1. Use --debug for more information.

az version 2.59.0

Can't remove it or anything.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Machine Learning az ml needs-author-feedback More information is needed from author to address the issue.
Projects
None yet
Development

No branches or pull requests