1. 程式人生 > >python3使用AES報錯ImportError: cannot import name '_AES'解決方法

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的學習-踐行-總結

喜歡研究和分享技術瓶頸,歡迎關注

獨學而無友,則孤陋而寡聞!