Search code examples
pythonlinuxpyqtportabilitypython-bindings

How to convert a Python PyQt based program to a portable package in Linux?


I've managed to make a single working executable file (for Windows) from a PyQt based Python app using PyInstaller, but is it also possible for Linux? On linux machine (LUbuntu), when I run the .py script, I've got errors about missing PyQt bindings and I can't even download them by apt-get because of inability to connect the servers. It would be much more convenient to somehow pack the missing libraries to my program's files in order to make it more portable, but how can I do it?


Solution

  • If you package your application in the Linux distribution's package format, it can contain dependency information. That is the canonical solution to this problem.

    Otherwise you'd have to include all nested dependencies to make sure that it'll work.