Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'Cryptodome' #1

Closed
shreyas-badiger opened this issue Apr 10, 2020 · 9 comments
Closed

ModuleNotFoundError: No module named 'Cryptodome' #1

shreyas-badiger opened this issue Apr 10, 2020 · 9 comments

Comments

@shreyas-badiger
Copy link

Unable to run example_run.py

Screenshot 2020-04-10 at 11 56 31 AM

@gannimo
Copy link
Member

gannimo commented Apr 10, 2020

You need to install the Cryptodome library. You can do so through sudo apt install python3-pycryptodome, pip install pycryptodome or pip3 install pycryptodomex. I've updated the README accordingly. Thanks!

@gannimo gannimo closed this as completed Apr 10, 2020
@shreyas-badiger
Copy link
Author

shreyas-badiger commented Apr 10, 2020

Thanks!
The command is actually:
pip3 install pycryptodomex

@gannimo
Copy link
Member

gannimo commented Apr 11, 2020

This depends on your local system. If you have both legacy python and python3 installed then pip installs for legacy, otherwise pip installs for python3. I'll make a note :)

@ineiti ineiti mentioned this issue Apr 11, 2020
@avandeursen
Copy link

I think @HARD-FAULT is referring not just to python3, but also to the x version of PyCryptodome.

pip install pycrotodomex works like a charm for me
pip install pycrotodome gives the ModuleNotFoundError

@gannimo
Copy link
Member

gannimo commented Apr 11, 2020

OK, I'll adjust. There are too many sub libraries and the different pip commands refer to different subsets of the library. Debian/Ubuntu conveniently installs both. Thanks!

@koenvervloesem
Copy link

Note that in a Python 3 virtual environment, you also need to install pycryptodomex instead of pycryptodome:

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip3 install pycryptodome
(venv) $ python3 example_run.py
Traceback (most recent call last):
File "example_run.py", line 23, in
import LowCostDP3T
File "/home/koan/reference_implementation/LowCostDP3T.py", line 20, in
from Cryptodome.Util import Counter
ModuleNotFoundError: No module named 'Cryptodome'
(venv) $ pip3 install pycryptodomex
(venv) $ python3 example_run.py
Day: Alice, Bob, and Isidor do not have contact.
Day: Alice, Bob, and Isidor do not have contact.
Day: Alice and Bob work in the same office, Isidor elsewhere.
Day: Alice and Bob work in the same office, Isidor elsewhere.
Day: Alice and Bob work in the same office, Isidor elsewhere.
Day: Bob and Isidor meet for dinner.
Isidor is tested positive.
Check exposure of Alice and Bob.
Alice: (not positive)
Bob: (at risk)
At risk, observed e91393fcf6d314d95ad607a1cbe00fa6 on day -1 for 121

@robin-shaun
Copy link

I think @HARD-FAULT is referring not just to python3, but also to the x version of PyCryptodome.

pip install pycrotodomex works like a charm for me
pip install pycrotodome gives the ModuleNotFoundError

A spelling mistake, it's pycryptodomex.

@gannimo
Copy link
Member

gannimo commented Apr 25, 2022

Updated the comment to give options. Note that the README itself has much changed over time and this thread is likely no longer valid at all for this implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@koenvervloesem @avandeursen @gannimo @shreyas-badiger @robin-shaun and others