解决python种输入from Crypto.Cipher import AES 报错 ImportError: No module named Crypto.Cipher

来源:互联网 发布:ubuntu 声音图标 灰色 编辑:程序博客网 时间:2024/06/15 21:21

I ran into this on Mac as well, and it seems to be related to having an unfortunately similarly named “crypto” module (not sure what that is for) installed alongside of pycrypto via pip.

The fix seems to be removing both crypto and pycrypto with pip:

sudo pip uninstall cryptosudo pip uninstall pycrypto

and reinstalling pycrypto:

sudo pip install pycrypto

Now it works as expected when I do something like:

from Crypto.Cipher import AES
阅读全文
0 0
原创粉丝点击