Reputation: 343
I am having the following error:
from Crypto.Random import random
ModuleNotFoundError: No module named 'Crypto'
I have installed Crypto and pycryptodome but still get the same error. What am i doing wrong?
Upvotes: 0
Views: 1232
Reputation: 20756
The Windows filesystem is case-insensitive so crypto and Crypto are effectively considered the same thing. When you subsequently install pycryptodome
, pip
finds that a directory named with the target namespace already exists , follow these;
pip uninstall crypto
Go to this path and delete the crypto folder;
/path/to/python/Lib/site-packages/
Uninstall pycryptodome if it exists, and install again;
pip uninstall pycryptodome
pip install pycryptodome
Check this path again after installation, rename Folder "crypto" to "Crypto";
/path/to/python/Lib/site-packages/
Upvotes: 2