Creating a Windows executable on a Linux system

David Sumbler david at aeolia.co.uk
Wed Jun 26 12:30:31 EDT 2019


On Wed, 2019-06-26 at 13:41 +0200, Cecil Westerhof wrote:
> I need to write a Python desktop program. I create it on a Linux
> system, but it has to run on a Windows system. When looking at how to
> create an executable it seems that you need to be on a Windows system
> to create a Windows executable. Is this true, or is it possible to
> create a Windows executable on a Linux system?
> 
> Any pointers about best practice creating a standalone executable are
> welcome.

I'm no expert, but installing pyinstaller in wine works for me.  I
admit, though, that I have only tried it with one file, which I wanted
to send to my brother.

I'm using Ubuntu 18.04, and the command: 

wine ~/.wine/drive_c/Python34/Scripts/pyinstaller.exe --onefile
bin/GradientProfile_v2.py

produces a file that my brother can run on his Windows 10 machine.

David




More information about the Python-list mailing list