ImportError: No module named Crypto.Cipher

前端 未结 25 1393
后悔当初
后悔当初 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

    To date, I'm having same issue when importing from Crypto.Cipher import AES even when I've installed/reinstalled pycrypto a few times. End up it's because pip defaulted to python3.

    ~ pip --version
    pip 18.0 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
    

    installing pycrypto with pip2 should solve this issue.

提交回复
热议问题