Search code examples
pythoncryptographypipenv

pipenv: package installed but module not found


I recently installed pipenv. I need to use the module named Crypto under python 3.6. I currently run 3.8 so I decided to use pipenv !

pipenv install Crypto

Adding Crypto to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock (da1a8d) out of date, updating to (ca72e7)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (da1a8d)!
Installing dependencies from Pipfile.lock (da1a8d)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 9/9 —

Then I did : pipenv shell and ./skeleton.py init

I got the message :

Traceback (most recent call last):
  File "./skeleton.py", line 5, in <module>
    from toolbox import *
  File "/home/alex/Documents/4TC-CSC/csc/td2-code/toolbox.py", line 11, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'

I don't understand what is wrong... Any help would be appreciated :)


Solution

  • Literally, from the first page of the docs:

    pip install pycryptodome

    Notice it is not

    pip install crypto

    which is a totally different package.