No module named azure.storage.blob - Azure Linux VM (ubuntu 18.04)

I have created a Linux VM (ubuntu 18.04) in Azure .Installed Python3.6 on that using sudo apt install python3.7. Python programs are running fine. Now tried to install azure-storage-blob. could not find any apt-get package. I tried with pip3 - first installed pip3 and then sudo pip3 install azure-storage-blob. It's installed successfully. Now tried to run the folllowing simple code

import os, uuid
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient
try: print("Azure Blob storage v12 - Python quickstart sample") # Quick start code goes here
except Exception as ex: print('Exception:') print(ex)

Getting Error:

Traceback (most recent call last): File "basicblob1.py", line 2, in <module> from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient
ImportError: No module named azure.storage.blob
1

1 Answer

Did you try to run the python script as python3 basicblob1.py, if not you can try

As in some of the ubuntu machines python 3 is linked to python3 and python 2 is linked to python.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like