question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'azure.storage' not always reproducable

See original GitHub issue

Which service(blob, file, queue) does this issue concern?

queue (possibly others?)

What problem was encountered?

Installing azure-storage-queue (in a clean virtualenv) frequently (so not always) leads to a module installation which cannot be imported. The installation steps followed are the ones documented in https://docs.microsoft.com/en-us/azure/storage/queues/storage-python-how-to-use-queue-storage

In a fresh Python-3.6.3 virtualenv

$ pip install azure-storage-queue
... installation happens successfully, no errors ...
$  python -c 'from azure.storage.queue import QueueService'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'azure.storage'

Sometimes the installation does result into a module which can be imported without errors but most often, … it does not.

Have you found a mitigation/solution?

A mitigation yes

$ pip install azure-storage-queue --upgrade --force-reinstall Fixes the problem. Keep in mind that the installation is done on a clean virtualenv.

I’d expect the import to succeed without any further ado after installing azure-storage-queue. If specific details are required, pls let me know.

Tnx,

Jelle

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tomwwagstaff-productcommented, Aug 28, 2018

Having exactly this problem after conda install azure.

0reactions
CoenraadScommented, Aug 4, 2020

I am having the same issue.

Using a python 3.7 dev container, as clean as an environment I can get.

Python 3.7.8

azure-core==1.7.0
azure-storage-blob==12.3.2
certifi==2020.6.20
cffi==1.14.1
chardet==3.0.4
cryptography==3.0
idna==2.10
isodate==0.6.0
msrest==0.6.18
oauthlib==3.1.0
pycparser==2.20
requests==2.24.0
requests-oauthlib==1.3.0
six==1.15.0
urllib3==1.25.10
Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'azure-storage-blob' – Finxter
Solution Idea 1: Install Library azure-storage-blob. The most likely reason is that Python doesn't provide azure-storage-blob in its standard library. You need ...
Read more >
No module named azure.storage.blob (when doing syncdb)
As I know, this issue is due to the version of azure storage client library for python.The old version has only one blobservice.py...
Read more >
No module named 'azure.storage.blob' - Microsoft Q&A
Im writing in VS Code and python, on a windows computer. I'm trying to create an Azure function with Blob Trigger. When I...
Read more >
blockblobservice - Python Forum
yields the error message: ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob' The only working solution I found was ...
Read more >
azure-storage-queue 12.5.0 - PyPI
Microsoft Azure Azure Queue Storage Client Library for Python. ... az group create --name my-resource-group --location westus2 # Create the storage account ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found