Hello, can you help me? I have installed a hardware switch to my RPI to run the shutdown command, I am using gpiozero and it was all working perfectly until I installed the latest LEIA v8.95.1 beta, now if i try to run the command I get an error "ImportError: No module named pkg_resources".
Here Is the command with the error:
LibreELEC:~ # python /storage/shutdown-press-simple.py
Traceback (most recent call last):
File "/storage/shutdown-press-simple.py", line 5, in <module>
from gpiozero import Button
File "/storage/.kodi/addons/virtual.rpi-tools/lib/gpiozero/__init__.py", line 22, in <module>
from .devices import (
File "/storage/.kodi/addons/virtual.rpi-tools/lib/gpiozero/devices.py", line 19, in <module>
import pkg_resources
ImportError: No module named pkg_resources
And in case you need it, this is my script:
import sys
sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
#!/usr/bin/env python3
from gpiozero import Button
import os
Button(21).wait_for_press()
os.system("shutdown now")