Flatpak and python dependencies


I am using the tool flatpak-pip-generator to manage python dependencies for a Gtk4 python project. requirements.txt file is generated using pipenv.

The issue I face is that I am locally using python 3.12 to generate the list of dependencies and python 3.11 is used for the flatpak environment.

What are the recommendations with Gnome Builder to generate the list of dependencies knowing that the flatpak python version may differ ? Install python 3.11 locally on top of python 3.12 ?


I think the most simple solution is run flatpak-pip-generator on the terminal inside Builder, who is in the flatpak context e so it run on python 3.11.

Thanks for your reply. How do you get the terminal in the flatpak context ? In my case, terminal is in the system context.

Oh, I believed builder terminal was always in flatpak context (I don’t use Builder). nevermind. You can do:

flatpak run --command=bash your.app.id

Replacing “your.app.id” with, well, your app ID.