最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Problem when compiling with pyinstaller and sending to another server - Stack Overflow

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论