Seeing error "from azure.mgmt.compute import ComputeManagementClient ModuleNotFoundError: No module named 'azure'"

Daniel Hajsadr 0 Reputation points
2024-01-17T11:40:12.3933333+00:00

Hi, I have added two Azure SDK packages to my python script:

from azure.mgmt.compute import ComputeManagementClient
from azure.identity import DefaultAzureCredential 

It complains about both e.g. "Import azure.mgmtcompute could not be resolved Pylance"
Running the script it errors: from azure.mgmt.compute import ComputeManagementClient ModuleNotFoundError: No module named 'azure' I have ran the following:
pip install azure-mgmt-compute
pip upgrade azure-identity
python -m pip install --upgrade pip
pip list (relevant results below)
Package Version


azure-identity 1.15.0 azure-keyvault-secrets 4.7.0 azure-mgmt-compute 30.4.0 azure-mgmt-core 1.4.0 azure-mgmt-resource 23.0.1 pip 23.3.2

Python version is at 3.12.1 Can you please assist with this?

Developer technologies | Visual Studio | Other
{count} votes

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.