首页 > 解决方案 > Pycryptodome: ImportError: DLL load failed while importing _AES: %1 is not an 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.

我正在使用带有 Python 64 位 3.8.7 的 Windows 64 位。我用pip install pycryptodome. 但是当我尝试从 Pycryptodome 导入 AES 时,它会出现上述错误。谁能告诉我如何解决它?仅供参考,这是我在 Stack Overflow 上的第一篇文章,所以如果该帖子缺少任何内容,请告诉我。谢谢!

标签: pythonimporterrorpycryptodome

解决方案


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


推荐阅读