Azure Machine Learning compute instance - ImportError: cannot import name 'ContainerClient' RRS feed

  • Question

  • Hi, I'm trying to get data from Azure Blobs into a Python notebook running on an Azure Machine Learning compute instance, but I don't manage to import ContainerClient class from azure.storage.blob.

    When I try to import it using:

    from azure.storage.blob import ContainerClient, BlobClient

    it rises the error:

    ImportError: cannot import name 'ContainerClient'

    I'm using kernel Python 3.6 - Azure ML, but I got the same error with Python 3. The error seems independent on the azure-storage-blob version, I used 2.1.0 and also the last one 12.2.0.

    I don't have this problem running the same code locally, in my laptop. Any idea?


    Friday, February 28, 2020 9:17 AM

All replies

  • Hi,

    We have forwarded this feedback to our internal product team to check. We will update on this shortly.


    Friday, February 28, 2020 11:17 AM
  • Thanks a lot! It's really very urgent.

    I need to get lots of avro files from blobs, integrate them, perform filtering and some pre-processing, and use the final dataset to train a model. All this on a remote compute target. If you have suggestions about alternatives to the use of AML compute instance, it will also be very useful for me.

    Thanks again!


    Friday, February 28, 2020 12:15 PM
  • Hi,

    any news about this issue?

    Thanks again.

    Wednesday, March 4, 2020 9:16 AM
  • Hi,

    OpenDatsets have to lock the version due to breaking change of azure-storage-blob. You can also raise a user voice request here so the community can vote and provide their feedback, the product team then checks this feedback and implements the same.

    You can use the storage access method from azureml.core instead of what's in azure-storage-blob.

    Please follow the below link to access data in azure storage services.



    Wednesday, March 4, 2020 12:12 PM
  • Just checking in to see if the above answer(s) helped.


    If this answers your query, do click “Mark as Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread .

    And, if you have any further queries do let us know. 

    Monday, March 23, 2020 1:27 AM