【发布时间】:2017-03-17 20:48:18
【问题描述】:
我已将 Azure 包添加到我的 Anaconda 发行版中,并且还安装了适用于 Python 的 Azure 存储 SDK。我正在尝试使用以下方式读取已上传到特定 blob 容器的文件:
from azure.storage import BlobService
blob_service = BlobService(account_name='azure subscription name',
account_key='azure subscription key')
blobs = []
marker = None
while True:
batch = blob_service.list_blobs('vrc', marker=marker, prefix='VRC_')
blobs.extend(batch)
if not batch.next_marker:
break
marker = batch.next_marker
for blob in blobs:
print(blob.name)
当我运行此脚本时,我收到以下错误:
ImportError: No module named 'azure.storage'
如何解决此问题,以便我可以读取 Blob 容器中的文本文件和 PDF?
【问题讨论】:
标签: python azure azure-blob-storage azure-sdk-python