本文介绍了Python AES导入错误请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在AES内部使用Crypto(Python27 \Lib\Crypto\Cipher\AES模块)
I have AES inside Cipher inside Crypto(Python27\Lib\Crypto\Cipher\AES module)
当我尝试 import AES 从Crypto.Cipher 导入AES 我得到以下错误:
When I try to import AES from Crypto.Cipher import AES I get the following error:
Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> from Crypto.Cipher import AES File "C:\Python27\lib\Crypto\Cipher\AES.py", line 50, in <module> from Crypto.Cipher import _AES ImportError: cannot import name _AES
但是我可以 import 另一个模块,如从Crypto.Cipher import blockalgo 工作正常。所以我猜在AES模块有一些错误。
But I can import another module like from Crypto.Cipher import blockalgo working fine. So I'm guessing there some error in AES module?
推荐答案
很可能,你的PyCrypto安装是破碎的,_AES.dll
Most likely, your PyCrypto installation is broken and _AES.dll is missing.
尝试根据以下问题重新安装:
Try to reinstall it according to this question: How do I install PyCrypto on Windows?
这篇关于Python AES导入错误请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!