WEB-DL

Python报错:ImportError: No module named Crypto.Cipher

报错信息:

from Crypto.Cipher import AES
ImportError: No module named 'Crypto'

windows 如果直接 pip install pycrypto 通常会要求安装 VC++ 的编译器,比较麻烦。

解决方法

pip install pycryptodome

Windows安装后需要将Python下site-packages 下的 crypto 目录的 c 改为 C (大写)
Linux直接就可以用了
再次 from Crypto.Cipher import AES 就可以正常使用了

码字很辛苦,转载请注明来自非WEB-DL资源站《Python报错:ImportError: No module named Crypto.Cipher》

评论