ModuleNotFoundError: No module named 'azureml.train'

BHARATH KUMAR K C S 0 Reputation points
2023-09-27T16:38:04.0333333+00:00
Traceback (most recent call last):
  File "wind_mill_file.py", line 3, in <module>
    import azureml.train.automl
ModuleNotFoundError: No module named 'azureml.train'


I'm facing the above error I tried adding the module in my system(pip3 install --user azureml-sdk) but nothing worked. I tried all the possible commands and online solutions but nothing was useful. It installs but after running the pipeline it's still stating the same module error again. Team, please help me with this issue...

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

1 answer

Sort by: Most helpful
  1. romungi-MSFT 44,661 Reputation points Microsoft Employee
    2023-09-28T07:39:10.1433333+00:00

    @BHARATH KUMAR K C S The error indicates that the missing module is azureml.train which is part of the package azureml-train-automl

    Since you have installed only azureml-sdk the package in question is still missing. Ideally, when you want to use the Azure ML SDK you have to install the azureml-core package first and then install the required packages as required. See this page for details.

    So, for your scenario try the following apart from installing azureml-sdk package.

    pip install --upgrade azureml-core
    pip install --upgrade azureml-train-automl
    

    If you are using a notebook environment add a % sign in front on pip install to install the same for the environment selected.

    I hope this helps!!

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    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.