小编use*_*942的帖子

如何在python中导入Azure BlobService?

我们可以导入azure.storage,但不能访问BlobService属性

文档说使用以下import语句:

from azure.storage import BlobService
Run Code Online (Sandbox Code Playgroud)

但是得到以下错误:

ImportError: cannot import name BlobService
Run Code Online (Sandbox Code Playgroud)

我们尝试了以下方法:

import azure.storage
...
foo = azure.storage.BlobService(...)
Run Code Online (Sandbox Code Playgroud)

但是收到了以下错误:

AttributeError: ‘module’ object has no attribute ‘BlobService’
Run Code Online (Sandbox Code Playgroud)

我们还用"azure.storage.blob"代替"azure.storage"尝试了上述所有内容

我们尝试更新azure-storage软件包,但它是最新的(版本0.30.0)

我们还尝试卸载azure-storage并安装整个azure包,但我们得到了相同的结果.我们尝试用pip和conda安装它们,但两次都是相同的结果.

我知道输出表明此版本的azure.storage没有BlobService属性,但文档明确指出要从那里导入.

https://azure.microsoft.com/en-us/documentation/articles/machine-learning-data-science-create-features-blob/

python azure azure-storage-blobs

14
推荐指数
2
解决办法
1万
查看次数

标签 统计

azure ×1

azure-storage-blobs ×1

python ×1