-
Notifications
You must be signed in to change notification settings - Fork 22
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
No module named 'Crypto' #8
Comments
You are missing the Crypto module. You will need to install it: python -m pip install pycryptodome |
I'm closing this issue since I haven't heard back. However, please feel free to re-open it if that does not fix your problem: python -m pip install pycryptodome |
Just to point this out. I'm having the exact same issue. Here's a list of installed packages and me running the commands
|
I see that you are running python 3.9 on Windows. Full disclosure, I rarely use windows so there may be a better fix, but in my experience, Windows Python modules get corrupt or mapped wrong. My fix is to always uninstall and reinstall the packages:
|
Thanks for the tip, but I was already a step ahead of you as I had done a reinstall of all of the related modules. Even deleted the pip cache. |
It also seems that my initial copy paste of the console output did not include the |
Which versions of python do you have installed? (note:
My default was set to python 3.7. When I switched to 3.9 the modules were corrupt and I had to reinstall them.
Also, make sure you do not have pycrypto installed. It doesn't work well on Windows. This should show the modules you have installed:
Do you get the same errors with |
Ran all of these in the same command promt. I have a feeling I might simply need to add additional modules to my PATH or something?
|
I managed to resolve the issue by renaming the |
That's great! It may not matter since you hacked it to work, but looking at the pip list you send the first two modules are corrupt and should not be there. I suspect this could be causing some of the problem as well - it looks like the first was supposed to be "pip" and second one "Crypto" but they got renamed with a "-" prefix:
|
Yeah that could very well be the case. although the Crypto rename issue seems to be something common as I've spotted it multiple times across the interwebs. |
i got this error
python -m tuyapower
Traceback (most recent call last):
File "C:\Python38\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Python38\lib\runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Python38\lib\runpy.py", line 111, in get_module_details
import(pkg_name)
File "D:\Programing\tuya\tuyapower\tuyapower_init.py", line 40, in
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
The text was updated successfully, but these errors were encountered: