python3使用AES报错ImportError: cannot import name '_AES'解决方法

Traceback (most recent call last):
File “C:\Program Files\JetBrains\PyCharm 2017.2.4\helpers\pydev\pydevd.py”, line 1599, in
globals = debugger.run(setup[‘file’], None, None, is_module)
File “C:\Program Files\JetBrains\PyCharm 2017.2.4\helpers\pydev\pydevd.py”, line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File “C:\Program Files\JetBrains\PyCharm 2017.2.4\helpers\pydev_pydev_imps_pydev_execfile.py”, line 18, in execfile
exec(compile(contents+"\n", file, ‘exec’), glob, loc)
File “C:/Users/billl/Desktop/记录文件/Python-Crypto/RSA-AES-MD5-DES-SHA.py”, line 4, in
from Crypto.Cipher import AES
File “C:\Users\billl\AppData\Local\Continuum\anaconda3\lib\site-packages\Crypto\Cipher\AES.py”, line 50, in
from Crypto.Cipher import _AES
ImportError: cannot import name ‘_AES’

导致这种错误的原因是没有正确安装AES库,执行下面命令安装Python3版本的AES库:

pip install pycryptodome


ID:Python之战

|作|者|公(zhong)号:python之战

专注Python,专注于网络爬虫、RPA的学习-践行-总结

喜欢研究和分享技术瓶颈,欢迎关注

独学而无友,则孤陋而寡闻!


猜你喜欢

转载自blog.csdn.net/weixin_41624982/article/details/85257412
今日推荐