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.