title: Unresolved import 'azure.storage.blob' when trying to use Python library azure-storage-blob
body: <p>Following this URL as example: <a href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python#list-the-blobs-in-a-container" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python#list-the-blobs-in-a-container</a></p>
  <p>I'm trying to use Python library, azure-storage-blob to extract the file names of the files stored in blob. I already installed all required package as followed using conda as I am using virtual environment in anaconda.</p>
  <p>conda install -c anaconda azure
  conda install -c conda-forge azure-storage-blob
  conda install -c conda-forge azure-nspkg</p>
  <p>But my code won't compile with error message Unresolved import 'azure.storage.blob'
  I also have an error:
  ModuleNotFoundError: No module named 'azure'</p>
  <p>But, I already installed these packages. Could you please let me know how I can resolve this issue?</p>
  <p>Here is my code:</p>
  <pre><code>    import os, uuid
  from azure.storage.blob import BlobClient, BlobServiceClient, ContainerClient, __version__
  
  try:
      print(&quot;Azure Blob Storage v&quot; + __version__ + &quot; - Python sample&quot;)
  except Exception as ex:
      print('Exception:')
      print(ex)
  
  # Retrieve the connection string for use with the application. The storage
  # connection string is stored in an environment variable on the machine
  # running the application called AZURE_STORAGE_CONNECTION_STRING. If the environment variable is
  # created after the application is launched in a console or with Visual Studio,
  # the shell or application needs to be closed and reloaded to take the
  # environment variable into account.
  connect_str = os.getenv('AZURE_STORAGE_CONNECTION_STRING')
  
  # Create BlobServiceClient object
  blob_service_client = BlobServiceClient.from_connection_string(connect_str)
  
  containers_list = blob_service_client.list_containers
  
  print(containers_list)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/1Kh8X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Kh8X.png" alt="unresolved" /></a></p>
  <p><a href="https://i.stack.imgur.com/4iswz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4iswz.png" alt="modulenotfound" /></a></p>