python - Raspbian Python azure.storage ImportError : No module named cryptography. hazmat.primitives.keywrap

标签 python azure raspbian raspberry-pi3

我正在尝试将图片从 RPi3 上传到 Azure blob 存储。我使用 raspbian 和 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 cryptographyhttps://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/

相关文章:

python - 如何按列值切片 Numpy 数组

python - 如何在Python Sphinx中转义双冒号

azure - 将在线 Azure Function 移动到本地 git 存储库的最佳方法是什么?

azure - 没有为 WebJob 注册路由

python-3.x - 是否可以在不使用硬件适配器的情况下直接使用 UART 与自动售货机(使用 MDB)进行通信?

macos - Raspberry PI 和 Mac OSx 之间的屏幕共享

python - 嵌套函数不起作用,为什么?

python - 从 Python 运行 QGIS 时没有名为 sip 的模块

azure - 将文件上传到 Azure webrole 应用程序目录

linux - 树莓派网络