我正在尝试将图片从 RPi3 上传到 Azure blob 存储。我使用 raspbian 和 python 模块,如下所述。
- 使用 virtualwrapper 设置虚拟环境“azure”。
- 安装了 azure-storage,如下所示:https://github.com/Azure/azure-storage-python
我的问题是,无论我做什么,我都会不断收到以下错误
>>> from azure.storage import BlobService
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/.virtualenvs/azure/lib/python2.7/site-packages/azure_storage-0.33.0-py2.7.egg/azure/storage/__init__.py", line 21, in <module>
from .models import (
File "/home/pi/.virtualenvs/azure/lib/python2.7/site-packages/azure_storage-0.33.0-py2.7.egg/azure/storage/models.py", line 27, in <module>
from cryptography.hazmat.primitives.keywrap import(
ImportError: No module named cryptography.hazmat.primitives.keywrap
我尝试过 pip install cryptography
和 https://pypi.python.org/pypi/azure-storage ,但这并没有改变任何事情。我不断收到相同的错误ImportError:没有名为 cryptography.hazmat.primitives.keywrap 的模块
。我什至尝试导入 azure.storage
但这会引发相同的错误。
如果有人能够阐明如何让 azure-storage-blob
在 Raspbian 上工作,我将非常感激。
预先感谢您。
最佳答案
如果您不需要 0.33.0 的新功能,可以尝试坚持使用 azure-storage 0.32.0 以避免使用加密技术。在某些系统上使用加密技术存在一些困难( https://github.com/Azure/azure-storage-python/issues/219 )
关于python - Raspbian Python azure.storage ImportError : No module named cryptography. hazmat.primitives.keywrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39591561/