I’ve installed python 3.8, from vscode terminal I created an env and seem to have successfully installed azureml as below:
C:Python38python.exe -m venv tempml
tempmlscriptsactivate
pip install azureml-core
I then go into python and type
import azureml
but I get the following error:
ModuleNotFoundError: No module named ‘azureml’
if i go back to terminal and type
pip show azureml-core
i can indeed see it:
Name: azureml-core
Version: 1.53.0
Summary: Azure Machine Learning core packages, modules, and classes
Home-page: https://docs.microsoft.com/python/api/overview/azure/ml/?view=azure-ml-py
Author: Microsoft Corp
Author-email: None
License: https://aka.ms/azureml-sdk-license
Location: c:python38tempmllibsite-packages
Requires: docker, msal, azure-common, paramiko, msrestazure, azure-mgmt-resource, msrest, PyJWT, azure-graphrbac, azure-core, ndg-httpsclient, contextlib2, jmespath, backports.tempfile, adal, argcomplete, urllib3, azure-mgmt-network, cryptography, knack, pkginfo, python-dateutil, jsonpickle, azure-mgmt-keyvault, azure-mgmt-containerregistry, azure-mgmt-storage, humanfriendly, azure-mgmt-authorization, pathspec, pytz, msal-extensions, requests, pyopenssl, packaging, SecretStorage
Required-by:
if someone could please help it would be much appreciated. Thank you
2
Answers
I found the absolute path and then added it using sys:
then in python:
and this now works
You need to make sure you are using an interpreter with the
azureml
module installed. It appears in the lower right corner, click on it to switch interpreters, choosing the correct one.Also make sure to execute the script using the python extension