I’m trying to compile a Python script into an .exe file using PyInstaller on a Windows virtual machine (VM) (since the target environment requires an .exe, and my main workstation is a Mac). The compilation works fine on the VM, but when I transfer the .exe to another server/computer, I get the error:
This app is incompatible with the version of Windows running on this computer.
Check the system information and contact the software publisher.
Even a simple script like print("Hello World")
produces the same error. Here’s what I’ve checked:
- The VM uses Windows 11, while the target server runs Windows 10 (but I thought Windows executables were backward-compatible).
- Python isn’t installed on the server (as PyInstaller should bundle the interpreter).
Question:
Why does the compiled .exe fail on the target machine, and how can I fix this?
P.s. Everything is installed on a 64-bit system.