ImportError: No module named Crypto.Cipher

前端 未结 25 1378
后悔当初
后悔当初 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 05:03

    I've had the same problem 'ImportError: No module named Crypto.Cipher', since using GoogleAppEngineLauncher (version > 1.8.X) with GAE Boilerplate on OSX 10.8.5 (Mountain Lion). In Google App Engine SDK with python 2.7 runtime, pyCrypto 2.6 is the suggested version. The solution that worked for me was...

    1) Download pycrypto2.6 source extract it somewhere(~/Downloads/pycrypto26)

    e.g., git clone https://github.com/dlitz/pycrypto.git

    2) cd (cd ~/Downloads/pycrypto26) then

    3) Execute the following terminal command inside the previous folder in order to install pyCrypto 2.6 manually in GAE folder.

    sudo python setup.py install --install-lib /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
    

提交回复
热议问题