【发布时间】:2020-03-05 04:44:27
【问题描述】:
我有以下代码行:
from azure.storage.blob import BlobServiceClient
我收到以下错误:
from azure.storage.blob import BlobServiceClient
ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob' (/home/user-name/.local/lib/python3.7/site-packages/azure/storage/blob/__init__.py)
我在 PythonAnywhere 和我的本地机器上都有这个错误。 我正在关注教程here
我已经阅读了 github 上的this post,但无济于事。
缺少什么?我要实现的目标是当我有 URI 和共享密钥时访问容器中的 blob。
感谢任何帮助。
【问题讨论】:
-
我无法在 PythonAnywhere 上重现它。我所做的是:
pip3.7 install azure-storage-blob --user在 bash 控制台中,然后是python3.7 -c "from azure.storage.blob import BlobServiceClient,它工作得很好。
标签: python azure azure-storage azure-blob-storage