I've been teaching myself Python3/API/PyQt5 and OOP for the last few weeks and I have finally made an app that works, yay!
I've been working on Ubuntu 19 and the app works fine when I run it from the terminal. The problem is trying to compile it (correct term?) to make it an executable for Linux and Windows.
I used pyinstaller app.py --onefile -w --icon="app.ico" to make the files and I get no errors that I can see. 
I used Windows 10 to compire the exe.
Here is the problem: On Linux I get a "shared library" file that doesn't execute and on windows the exe is just broken. All I get is an error saying "this program cannot run on your system", or something similar to that.
This is a very simple, 1 script app with a PyQt5 GUI. I'm pretty new to all of this and this has by far been the hardest part. I've been stuck on this for days and I can't get it to work.
I can give you guys the app code if it will help, I just don't think I have enough rep to post links so it might have to be a code block.
I will be grateful for any help you guys can give as I'm out of ideas.
Cheers!
Editing to add: windows 8.1 gives the error message "Error -3 from inflate: invalid block lengths" when the app.exe is run
To make it work on Unix systems you will probably have to use dos2unix "appname" in Terminal, since windows adds some weird endings to any files containing text. That's how it works for me
Executables made with pyinstaller not working