Pyinstaller 应用创建于 mac 且无法与 Windows 用户共享

Pyinstaller app created on mac and cant share with Windows Users

你好,我目前制作了一个 运行 非常完美的 .app 我已经与使用 mac 的朋友分享了它并且它 运行 非常完美 这是一个 PyQt5 应用程序我用 pyinstaller 创建了我用来制作它的命令是:

pyinstaller --icon=(.....).icns --onefile --noconsole -n(.....)(.py 脚本)完美编译并创建带有图标的应用程序图像并打开,所有我能够将其压缩成一个 zip 文件并通过电子邮件将其发送给我的 mac 用户,这些用户也 运行s 他们无需安装任何东西

但我有一些 window 用户朋友,我想与之共享,但 .app 显然无法工作(我尝试更改文件名并将 .app 替换为 .exe)并尝试发送那些行不通的他们尝试 运行 它说

"this app can't run on your pc To Find a version for your pc check with the software publisher"

所以我尝试编译一个新的应用程序,但是在 pyinstaller 中使用 -F 添加到我在终端中使用的代码中,然后在终端中添加了一堆东西 运行s 说。 exe 和所有这些,当我将它拖到我的桌面上时,它是一个 .app,所以我再次将它更改为 .exe,并尝试与我的 window 用户朋友分享它,但我得到了同样的错误

"this app can't run on your pc To Find a version for your pc check with the software publisher"

任何人都可以帮助我,我真的很想知道如何在 windows 计算机上制作它 运行!

要创建 Windows 应用程序,需要使用 Windows 在 PC 中编译脚本。 Mac 和 Linux 相同。这是在 manual:

PyInstaller is tested against Windows, Mac OS X, and Linux. However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows; to make a Linux app you run it in Linux, etc. PyInstaller has been used successfully with AIX, Solaris, and FreeBSD, but is not tested against them.