问题描述
当我尝试导入 Pycryptodome 时遇到了这个问题。
Traceback (most recent call last): File "C:\Users\me\Documents\Python\Python 3.8\file.pyw",line 17,in <module> from Crypto.Cipher import AES File "C:\Users\me\AppData\Local\Programs\Python\python38\lib\site-packages\pycrypto-2.6.1py3.8-win-amd64.egg\Crypto\Cipher\AES.py",line 50,in <module> from Crypto.Cipher import _AES
然后:
ImportError: DLL load Failed while importing _AES: %1 is not a valid Win32 application.
我使用的是 Windows 64 位和 Python 64 位 3.8.7。我用 pip install pycryptodome
安装了 Pycryptodome(版本 3.9.9)。但是当我尝试从 Pycryptodome 导入 AES 时,它会出现上述错误。谁能告诉我如何解决它?仅供参考,这是我在 Stack Overflow 上的第一篇文章,所以如果这篇文章遗漏了什么,请告诉我。谢谢!
解决方法
天哪,需要安装pycryptodome 3.8.2。愚蠢的错误哈哈。