0
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'

I am using PyCharm Community 2020.3 and Python 3.9.

This project previously compiled and ran, but I had to replace the computer and re-create my development environment, and at that point, the project failed as above.

I re-installed pycryptodome (see picture), but still getting error.

Something is causing the compiler to not take note of pycryptodome being there. Maybe something else is eclipsing it? Do I need to uninstall the library "crypto"?

enter image description here

enter image description here

Guy
  • 666
  • 1
  • 10
  • 34
  • Try checking using - pip3 freeze to list the installed libraries just in case you are using virtual environment to verify – Shreyash bhatt Dec 21 '20 at 08:02
  • @Shreyashbhatt - `pip3 freeze` doesn't show anything when I run in DOS shell. But in Pycharm it shows aes==1.0.0 certifi==2020.12.5 chardet==4.0.0 crypto==1.4.1 idna==2.10 multipledispatch==0.6.0 Naked==0.1.31 pycryptodome==3.9.9 PyYAML==5.3.1 requests==2.25.1 shellescape==3.8.1 six==1.15.0 urllib3==1.26.2 – Guy Dec 21 '20 at 09:12
  • @madzohan - It gave me a helpful idea. I'll post as answer. – Guy Dec 21 '20 at 09:18

1 Answers1

12

I followed @madzohan link.

  • uninstall crypto. I had installed this because I followed PyCharm's suggestion.
  • uninstall pycryptodome
  • re-install pycryptodome

I was able to run my script no problem.

Guy
  • 666
  • 1
  • 10
  • 34