我已经在 python 3.6.5 上安装了 pycryptodomex 模块,但是当我尝试执行下面的调用时,我收到标题中提到的错误
from Crypto.Cipher import AES
我想使用 AES 加密文件。现在如何进行?
>> pip install pycryptodome
from Crypto.Cipher import AES #Works
或
>> pip install pycryptodomex
from Cryptodome.Cipher import AES
对于 python3,包名称现在为 pycryptodome 或 pycryptodomex
如果您需要与Python2的项目兼容,请使用pycryptodome,或者使用pycryptodomex,它是一个独立于旧PyCrypto的库。
你好,我遇到了同样的问题: _几乎是旧 PyCrypto 库的直接替代品。你安装它:
$ pip install pycryptodome ((3.8.2)) 或最新版本 转到这个目录: 2) [C:\Users\s****\AppData\Local\Programs\Python\Python37-32\Lib\site-package