My python packaged file runs perfectly on Ubuntu Linux. I open the terminal and type
./[filename]
and the program runs but same thing did not happened on Windows terminal both cmd
and powershell
. I also tried renaming the file to .exe
to make it executable but it also didn't worked for me.
Also, I didn't have python
and pyinstaller
installed on Windows machine.
No, linux-packed pyinstaller programs will not run on windows, you have to get sources of scripts and repack on windows using pyinstaller. Because pysintaller packages executable binary programs and shared libraries inside, which have different format in Windows and Linux.
Content of pyinstaller packed file is a kind of SFX archive in special custom pysintaller's format. I've just looked through pyinstaller's module code and based on received knowledge implemented next simple script to extract all content of pyinstaller's packed file, provide
fname
in the script: