Reputation: 333
I keep getting an import error saying:
ModuleNotFoundError: No module named 'Crypto'
I have gone over various other answers about how to resolve this, but it does not mention how I can resolve the issue in PyCharm.
I originally tried to pip3 install pycrpyto
in the Pycharm terminal, but it would not install. Then I hear about pycryptodome and was able to install it properly. However, when I type import Crypto
, it keeps saying that the module was not found. How is this issue resolved in Pycharm.
Upvotes: 2
Views: 7063
Reputation: 44
Note: check if it is capital c or small c, the packages are case sensitive
Upvotes: 2
Reputation: 19
Go to: Pycharm>File>Settings>Python Interpreter> click +
Search for the package: Crypto or cryptography
and click install.
If the install fails with the SSL error: Could not fetch URL https://pypi.org/simple/crypto-mediator/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/crypto-mediator/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping
Go back to the same page and after selecting the package click on the checkbox Options and mention: --trusted-host pypi.org --trusted-host files.pythonhosted.org and then install the package
Upvotes: 1