Gpiozero not loading

  • Hello, I've been trying to install gpiozero in Libreelec but I've had no success because everytime I run my script it gives me this error message: "ImportError: No module named gpiozero". I installed it from the "Raspberry Pi Tools" program repository but not even the commands work, I use LibreELEC (Jarvis) v7.0.3 MR. I found the program files in this path ".kodi/addons/virtual.rpi-tools" so in theory it's installed? Just in case you need this info this is my Libreelec $PATH "/bin:/sbin:/usr/bin:/usr/sbin:/storage/.kodi/addons/virtual.rpi-tools/bin".

    • Official Post

    You will need something like this at the top of your script

    Code
    import sys
    sys.path.append['/storage/.kodi/addons/virtual.rpi-tools/lib']

    then your import gpiozero should work

  • Perfect It worked! Only one small correction, it should contain () instead of [ ] so this is how my code looks now:

    Code
    import sys
    sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')