Cannot Use the ML CLI v2

MLops user 1 Reputation point
2022-07-20T10:09:10.46+00:00

After installing the ML CLI v2, following the steps here: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-configure-cli?tabs=public,
I get the following error. For instance, when calling: az ml -h

cannot import name 'ARMChallengeAuthenticationPolicy' from 'azure.mgmt.core.policies' ([FILEPATH]__init__.pyc)
'ml' is misspelled or not recognized by the system.

{
"azure-cli": "2.23.0",
"azure-cli-core": "2.23.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ml": "2.6.1"
}
}

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,952 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 46,746 Reputation points Microsoft Employee
    2022-07-20T11:37:18.893+00:00

    @MLops user I think this was a known issue with older versions of Azure cli failing to support the Azure ML cli. Is it possible to upgrade the Azure cli version to a version >=2.30?
    A manual upgrade with the following command should work:

    az upgrade  
    

    I personally uninstalled older version of azure cli and installed the latest version of Azure cli and then installed the azure ml cli extension. This is the current setup with the latest version that works fine.

    az version  
    {  
      "azure-cli": "2.38.0",  
      "azure-cli-core": "2.38.0",  
      "azure-cli-telemetry": "1.0.6",  
      "extensions": {  
        "ml": "2.6.1"  
      }  
    }  
    

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.