ImportError: No module named Crypto.Cipher

前端 未结 25 1373
后悔当初
后悔当初 2020-11-28 04:08

When I try to run app.py (Python 3.3, PyCrypto 2.6) my virtualenv keeps returning the error listed above. My import statement is just from Crypto.Cipher import AES

25条回答
  •  野性不改
    2020-11-28 04:43

    On the mac... if you run into this.. try to see if you can import crypto instead?

    If so.. the package name is the issue C vs c. To get around this.. just add these lines to the top of your script.

    import crypto
    import sys
    sys.modules['Crypto'] = crypto
    

    You know should be able to import paramiko successfully.

提交回复
热议问题