azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

ModuleNotFoundError: No module named 'azure.mgmt.storage'

Open Zenthes opened this issue 7 years ago • 5 comments

Create new py3.6 env conda create -n myenv -y Python=3.6 conda activate myenv Install Jupyter conda install nb_conda Install the base SDK and Jupyter Notebook pip install azureml-sdk[notebooks]

so that we have azure 4.0.0 azure-applicationinsights 0.1.0 azure-batch 4.1.3 azure-common 1.1.17 azure-cosmosdb-nspkg 2.0.2 azure-cosmosdb-table 1.0.5 azure-datalake-store 0.0.40 azure-eventgrid 1.2.0 azure-graphrbac 0.40.0 azure-keyvault 1.1.0 azure-loganalytics 0.1.0 azure-mgmt 4.0.0 azure-mgmt-advisor 1.0.1 azure-mgmt-applicationinsights 0.1.1 azure-mgmt-authorization 0.50.0 azure-mgmt-batch 5.0.1 azure-mgmt-batchai 2.0.0 azure-mgmt-billing 0.2.0 azure-mgmt-cdn 3.0.0 azure-mgmt-cognitiveservices 3.0.0 azure-mgmt-commerce 1.0.1 azure-mgmt-compute 4.4.0 azure-mgmt-consumption 2.0.0 azure-mgmt-containerinstance 1.4.0 azure-mgmt-containerregistry 2.6.0 azure-mgmt-containerservice 4.4.0 azure-mgmt-cosmosdb 0.4.1 azure-mgmt-datafactory 0.6.0 azure-mgmt-datalake-analytics 0.6.0 azure-mgmt-datalake-nspkg 3.0.1 azure-mgmt-datalake-store 0.5.0 azure-mgmt-datamigration 1.0.0 azure-mgmt-devspaces 0.1.0 azure-mgmt-devtestlabs 2.2.0 azure-mgmt-dns 2.1.0 azure-mgmt-eventgrid 1.0.0 azure-mgmt-eventhub 2.2.0 azure-mgmt-hanaonazure 0.1.1 azure-mgmt-iotcentral 0.1.0 azure-mgmt-iothub 0.5.0 azure-mgmt-iothubprovisioningservices 0.2.0 azure-mgmt-keyvault 1.1.0 azure-mgmt-loganalytics 0.2.0 azure-mgmt-logic 3.0.0 azure-mgmt-machinelearningcompute 0.4.1 azure-mgmt-managementgroups 0.1.0 azure-mgmt-managementpartner 0.1.0 azure-mgmt-maps 0.1.0 azure-mgmt-marketplaceordering 0.1.0 azure-mgmt-media 1.0.0 azure-mgmt-monitor 0.5.2 azure-mgmt-msi 0.2.0 azure-mgmt-network 2.5.1 azure-mgmt-notificationhubs 2.0.0 azure-mgmt-nspkg 3.0.2 azure-mgmt-policyinsights 0.1.0 azure-mgmt-powerbiembedded 2.0.0 azure-mgmt-rdbms 1.5.0 azure-mgmt-recoveryservices 0.3.0 azure-mgmt-recoveryservicesbackup 0.3.0 azure-mgmt-redis 5.0.0 azure-mgmt-relay 0.1.0 azure-mgmt-reservations 0.2.1 azure-mgmt-resource 2.1.0 azure-mgmt-scheduler 2.0.0 azure-mgmt-search 2.0.0 azure-mgmt-servicebus 0.5.3 azure-mgmt-servicefabric 0.2.0 azure-mgmt-signalr 0.1.1 azure-mgmt-sql 0.9.1 azure-mgmt-storage 2.0.0 azure-mgmt-subscription 0.2.0 azure-mgmt-trafficmanager 0.50.0 azure-mgmt-web 0.35.0 azure-nspkg 3.0.2 azure-servicebus 0.21.1 azure-servicefabric 6.3.0.0 azure-servicemanagement-legacy 0.20.6 azure-storage-blob 1.4.0 azure-storage-common 1.4.0 azure-storage-file 1.4.0 azure-storage-nspkg 3.1.0 azure-storage-queue 1.4.0 azureml 0.2.7 azureml-contrib-brainwave 1.0.10 azureml-contrib-run 1.0.10 azureml-contrib-server 1.0.10 azureml-contrib-services 1.0.10 azureml-contrib-tensorboard 1.0.10 azureml-core 1.0.10 azureml-explain-model 1.0.10 azureml-pipeline 1.0.10 azureml-pipeline-core 1.0.10 azureml-pipeline-steps 1.0.10 azureml-sdk 1.0.10 azureml-telemetry 1.0.10 azureml-train 1.0.10 azureml-train-core 1.0.10 azureml-train-restclients-hyperdrive 1.0.10 azureml-widgets 1.0.10

But when i execute the following code in python: 'import azureml.core' 'print(azureml.core.VERSION)'

It returns "ModuleNotFoundError: No module named 'azure.mgmt.storage'"

Zenthes avatar Jan 29 '19 03:01 Zenthes

Hi @ljingsheng Can do you:

import azure.mgmt
print(azure.mgmt.__path__)

and look what files are available at that path?

Thanks,

lmazuel avatar Feb 06 '19 00:02 lmazuel

Seems like I am running into a similar issue. I decided to attempt using the conda installer and environment as per the machine learning services quickstart in my attempt to address this previous issue: https://github.com/Azure/MachineLearningNotebooks/issues/198

But now when importing azureml.core:

ModuleNotFoundError: No module named 'azure.mgmt'

(EDIT: ultimately discovered the module was not being found because there were multiple matches for azureml on the search path. finding and deleting everything, uninstalling and reinstalling worked)

tinkerer avatar Feb 08 '19 20:02 tinkerer

I have the same issue as @ljingsheng: ModuleNotFoundError: No module named 'azure.mgmt.storage'

@lmazuel, I've the following directory under azure.mgmt.__path__:

10/24/2018  02:11 PM    <DIR>          authorization
10/24/2018  02:13 PM    <DIR>          containerregistry
10/24/2018  02:23 PM    <DIR>          keyvault
10/24/2018  02:06 PM    <DIR>          resource

Azure package under the env:

Name Version Build Channel

ansiwrap 0.8.4 pypi_0 pypi attrs 19.1.0 py36_1 azure-graphrbac 0.61.1 pypi_0 pypi azure-mgmt-storage 4.0.0 pypi_0 pypi azureml-automl-core 1.0.53 pypi_0 pypi azureml-contrib-notebook 1.0.53 pypi_0 pypi azureml-core 1.0.53 pypi_0 pypi azureml-pipeline 1.0.53 pypi_0 pypi azureml-pipeline-core 1.0.53 pypi_0 pypi azureml-pipeline-steps 1.0.53 pypi_0 pypi azureml-sdk 1.0.53 pypi_0 pypi azureml-telemetry 1.0.53 pypi_0 pypi azureml-train 1.0.53 pypi_0 pypi azureml-train-automl 1.0.53 pypi_0 pypi azureml-train-core 1.0.53 pypi_0 pypi azureml-train-restclients-hyperdrive 1.0.53 pypi_0 pypi azureml-widgets 1.0.53 pypi_0 pypi

Any advice?

jcai2018 avatar Jul 30 '19 17:07 jcai2018

The list of packages installed doesn't match __path__ at all, which is surprising. Can you try to uninstall azure-mgmt-storage and install it back?

lmazuel avatar Aug 02 '19 19:08 lmazuel

Hello, As there has not been a response, I'm going to close this issue at this time. Please re-open if there is further need for this thread. Thanks, Deb

DebFro avatar Jun 11 '20 04:06 DebFro