Issues with a frozen Python application
Alexander Larsson
alexl at redhat.com
Tue Aug 10 09:19:21 UTC 2021
I would recommend running the built app under strace and look for
math.so in the logs to see where it tries to find the .so files.
On Tue, Aug 10, 2021 at 8:25 AM Flavio Calva <f.calva at gmail.com> wrote:
>
> Hi, I am trying to deploy an application using Flatpak. It is a Python
> application, and I freeze it using a tool. So, the final "result" is
> simple: an executable, some .so files and some assets (e.g. image
> files).
>
> Everything works when I execute it without Flatpak (launching the
> executable in the built directory). Then, I built a Flatpak repo, and
> I installed it.
>
> When I launch it using 'flatpak run', I get the following error:
>
> Traceback (most recent call last):
> File "__main__", line 16, in <module>
> File "importlib._bootstrap", line 991, in _find_and_load
> File "importlib._bootstrap", line 973, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'math'
>
> So, it looks like it can't find math.so. I have put it in /app/bin
> (next to the executable) or /app/lib, but I get the same error.
>
> A curious aspect is that it only happens with math.so: if I don't put
> the other dependencies in /app/bin then I get errors for these, but I
> can't solve this error for math.so.
>
> What could I do? If I have an application with an executable and some
> .so files, how should I arrange them?
>
> Is it expected to work if I put them in /app/bin, like I do in the
> "standalone" setting?
>
> Thank you very much!
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alexander.larsson at gmail.com
More information about the Flatpak
mailing list