ModuleNotFoundError: No module named ‘cryptography.hazmat.bindings._padding’

ubuntu下执行命令出现如下错误:

ubuntu@ip-172-31-11-253:~/nineuu_spider/Maomi$ python3 maomi.py
Traceback (most recent call last):
  File "maomi.py", line 8, in 
    from cryptography.hazmat.primitives import padding
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/padding.py", line 13, in 
    from cryptography.hazmat.bindings._padding import lib
ModuleNotFoundError: No module named 'cryptography.hazmat.bindings._padding'

但是实际上cryptography模块已经安装了:

如果要解决这个错误,安装paramiko即可:

pip3 install paramiko

Paramiko is a Python (2.7, 3.4+) implementation of the SSHv2 protocol [1], providing both client and server functionality. While it leverages a Python C extension for low level cryptography (Cryptography), Paramiko itself is a pure Python interface around SSH networking concepts.

☆版权☆

* 网站名称:obaby@mars
* 网址:https://lang.ma/
* 个性:https://oba.by/
* 本文标题: 《ModuleNotFoundError: No module named ‘cryptography.hazmat.bindings._padding’》
* 本文链接:https://baby.lc/2020/06/7212
* 短链接:https://oba.by/?p=7212
* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


You may also like

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注