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
. I looked for duplicates and you might say that there are some, but I tried the solutions (although most are not even solutions) and nothing worked.
You can see what the files are like for PyCrypto below:
Maybe you should this: pycryptodome==3.6.1 add it to requirements.txt and install, which should eliminate the error report. it works for me!
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
) then3) Execute the following terminal command inside the previous folder in order to install pyCrypto 2.6 manually in GAE folder.
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:
and reinstalling pycrypto:
Now it works as expected when I do something like:
if you are using redhat,fedora, centos :
sudo yum install pycrypto
for my case I coouldnot install it using pip
Try with pip3:
type command: