How to add proper "persistence" into a code?

I have a working script in python (acutally 2 files, on is the import of the other) .
I managed to create an executable for Manjaro - including a working persistence.
Now I am taking the same files and compiling an executable on Ubuntu - and the executable is not working - but I don’t get an error either.
Where can I look for the error (I am a total beginner)