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
For CentOS 7.4 I first installed pip and then pycrypto using pip:
> sudo yum -y install python-pip
> sudo python -m pip install pycrypto
If you are using this module with Python3 and having trouble with import. try this.
pip uninstall crypto
pip uninstall pycryptodome
pip install pycryptodome
Good Luck!
I had simular problem and fixed it with the next command
sudo pip3 install py
For Windows 7:
I got through this error "Module error Crypo.Cipher import AES"
To install Pycrypto in Windows,
Try this in Command Prompt,
Set path=C:\Python27\Scripts (i.e path where easy_install is located)
Then execute the following,
easy_install pycrypto
For Ubuntu:
Try this,
Download Pycrypto from "https://pypi.python.org/pypi/pycrypto"
Then change your current path to downloaded path using your terminal:
Eg: root@xyz-virtual-machine:~/pycrypto-2.6.1#
Then execute the following using the terminal:
python setup.py install
It's worked for me. Hope works for all..
If you an macos, rename lib folder lib/python3.7/site-packages/crypto
to lib/python3.7/site-packages/Crypto
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