Tirbo06
Tirbo06

Reputation: 773

No module named 'azureml' >> !pip install azureml-core >> from azureml.core import Experiment

I am facing issues with Azure ML when i try to install the SDK with pip install azureml-core and then import azureml.core in my script. I do not understand how can it be possible to have this error assuming that the package installation is complete and confirmed by the terminal output with:

"Requirement already satisfied: azureml-core in c:\python\python38\lib\site-packages"

I have installed azureml-core package with the terminal and in the script with !pip install azureml-core but still get this error...

SCRIPT:

!pip install azureml-core
from azureml.core import Experiment 
print(azureml.core.VERSION)

OUTPUT:

      1 #CONNNECTING TO AZURE INSTANCE
      2 get_ipython().system('pip install azureml-core')
----> 3 from azureml.core import Experiment
      4 print(azureml.core.VERSION)
      5 

ModuleNotFoundError: No module named 'azureml'

I am running the script locally with Python 3.8.10 on a Windows 10 last update and VSCode Insider.

My goal is to compute on an Azure instance without going through a remote because I would like to use my local fodlers.

enter image description here

Upvotes: 2

Views: 13245

Answers (1)

Tirbo06
Tirbo06

Reputation: 773

ANSWER:

I have no idea why but it is working now. Try to restart your VSCODE and your compute instance.

BTW, to check the version use :

import azureml
print(azureml.core.VERSION)

Upvotes: 3

Related Questions