[Django]-Import error: No module named 'Crypto' on Mac (Pycrypto is up-to-date)

10👍

There is a module named “crypto” that is causing the problem. At least for me, in Mac OS. There are two package names “crypto” and “Crypto” which causes this conflict.

Since you are using Python 3.4, try running the following commands to uninstall:

sudo pip3 uninstall crypto
sudo pip3 uninstall pycrypto

Then install the pycrypto module again using:

sudo pip3 install pycrypto

This should solve the issue.

1👍

I have same problem. I fix it by following command:

pip uninstall pycryptodome
pip uninstall pycrypto
pip uninstall crypto
pip install pycrypto
👤Z.Xl

0👍

You can use pip list command to check if there is a module named crypto inside your package, if not try easy_install Crypto to install instead of pip.

Leave a comment