How to install python module on LibreELEC

  • Need to install PyAudio module. As LibreELEC filesystem is read-only & does not have APT / PIP, I cannot installed anything. Also tried to copy the PyAudio module files, but could not get its dependency 'PortAudio' library.

    At-least is there a option to get the compiled 'PortAudio' binary for armV7 32bit (for TinkerBoard), so that we can place it under folder /storage and use them in my project.

  • LE uses add-ons by default, so search at the repos first. Other package managers are not available by design. However, some users install docker packages. Maybe that's an option for you.

    Please describe your hardware, your LE version and your goal.

  • I use TinkerBoard (armV7 rev1), and LE 9.2.6 and my goal is to control KODI playback using voice commands.

    Currently I tested docker too, hope I can achieve my goal with it. But need to check whether there is possibility to use external library with LE for my python application & to know which folder in /storage can be used to storing external lib.

  • Actually the /storage sub-folder doesn't matter, because it's all about the way to include the libs at the Python script. Do this:

    Code
    import sys
    sys.path.append('/storage/.kodi/userdata/<PATH-TO-YOUR-PYTHON-LIB-FOLDER>')

    The benefit of the /storage/.kodi/userdata folder is that it's part of the LE backup strategy.

  • Actually the /storage sub-folder doesn't matter, because it's all about the way to include the libs at the Python script. Do this:

    Code
    import sys
    sys.path.append('/storage/.kodi/userdata/<PATH-TO-YOUR-PYTHON-LIB-FOLDER>')

    The benefit of the /storage/.kodi/userdata folder is that it's part of the LE backup strategy.

    I have imported using sys as you mentioned, but PyAudio uses PortAudio Lib (C Lib), which cannot import as above. Thanks for you message i have made it work with docker. But some audio streaming error now. working on it.