I've been trying to get the gpiozero module into Thonny for a while (for use with a Raspberry Pi) and I've been having lots of issues with it. I installed gpiozero using the package installed inside Thonny and then called import gpiozero on line 1. However, I keep getting some sort of error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/gpiozero/__init__.py", line 19, in <module>
File "/lib/gpiozero/pins/__init__.py", line 12, in <module>
ImportError: no module named 'warnings'
I tried downloading the warnings module and importing it to but that didn't work. I also tried this with several other modules, such as pyautogui, keyboard, and krpc. None of these worked either. I have tried deleting Thonny and reinstalling it (64 bit, python 3.10) and that didn't work either. In addition I have also been getting a weird error from the Thonny module installer:
Copying colorzeroError (ManagementError(...), 'Command output was not empty')
What's going on?
ImportError: no module named 'warnings', this kind of errors usually come when some dependencies of packages are not installed. In your case check if all the packages and their dependencies are installed properly. You can do that withpip check. This warning package is usually a dependency of pytest package, and for your package it is an optional dependency github.com/gpiozero/gpiozero/blob/…