Azure Machine Learning - running code in curated environement gives ModuleNotFoundError: No module named 'azure.ai'

Anonymous
2023-02-25T21:47:40.28+00:00

The job crashes while trying to execute
from azure.ai.ml import MLClient

in the curated environment AzureML-ACPT-pytorch-1.13-py38-cuda11.7-gpu:1

I am getting:

    from azure.ai.ml import MLClient
ModuleNotFoundError: No module named 'azure.ai'

How can I fix it? There is installation of azure-ai-ml library in this environment so I don't understand why it crashed.

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

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,736 Reputation points
    2023-02-28T10:10:28.6966667+00:00

    Adrianna Puślecka Thanks, Can you try using the latest version as shown below.

    You can try to upgrade pip and then install the azure package using these commands:

    pip install --upgrade pip

    pip install azure-ai-ml

    Did you follow the steps to install azure ai ml.

    https://learn.microsoft.com/en-us/python/api/overview/azure/ai-ml-readme?view=azure-python

    User's image

    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.