Pycryptodome: ImportError: DLL load failed while importing _AES: %1 is not a valid Win32 application

Pycryptodome: ImportError: DLL load failed while importing _AES: %1 is not a valid Win32 application

我在尝试导入 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 上的第一个 post,所以如果 post 遗漏任何内容,请告诉我。谢谢!

我真傻,需要安装 pycryptodome 3.8.2。愚蠢的错误哈哈。