UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to include non-installed python libraries in apps

    Scheduled Pinned Locked Moved App Development
    1 Posts 1 Posters 283 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • O Offline
        olga.bio
        last edited by

        I am trying to write a speech-to-text app using vosk library, but have little understanding on how to include the library. I have read the following thread https://forums.ubports.com/topic/1321/solved-how-to-import-python-library-to-clickable?lang=de and understood some of it. Basically,

        • if the library is not installed and uses C you have to crosscompile it for Ubuntu Touch
        • best way to do it is using clickable docker images

        Is this correct so far? (Are there any tutorials including this part of the process?)
        Now, the part I don't understand at all: how do I let python know that the additional lib is shipped with the app? Is there any way to modify PYTHONPATH? Or should the app bring its own version of python? Or something else entirely?
        (Apologies in case I am missing obvious things, I am an interpreter-language-only person :] )

        1 Reply Last reply Reply Quote 2
        • First post
          Last post