ModuleNotFoundError: No module named 'Crypto'

代码

1
2
from Crypto.Cipher import PKCS1_v1_5
from Crypto.PublicKey import RSA

错误

1
2
3
4
5
6
Traceback (most recent call last):
File "/Users/jakehu/Documents/Web/python-usability-cli/app.py", line 13, in <module>
from libs import cmdb, esutil, mysqlutil, redisutil, sendmsg
File "/Users/jakehu/Documents/Web/python-usability-cli/libs/sendmsg.py", line 14, in <module>
from Crypto.Cipher import PKCS1_v1_5
ModuleNotFoundError: No module named 'Crypto'

解决

1
2
3
pip3 uninstall crypto
pip3 uninstall pycrypto
pip3 install pycrypto