Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate a Windows executable using pyinstaller on Linux?

I'm trying to generate an executable from Linux for Windows using pyinstaller.

pyinstaller --onefile --windowed montecarlo.py

I run this command and get a single executable that works on Linux just fine, but if I try on Windows, it's just a simple file. Why?

like image 569
Drakota Avatar asked Aug 04 '26 02:08

Drakota


1 Answers

I was trying to do this same thing today and ran across this answer. It pointed to the FAQ, which says cross-compiling is not supported. It recommends using Wine.

like image 168
Jack Avatar answered Aug 05 '26 19:08

Jack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!