python - Kali 上的 Pyinstaller 为 Windows XP 创建 exe

标签 python linux windows exe

我在 Kali Linux 2 上使用 Pyinstaller 创建 .exe 以在 Windows XP 上运行。

到目前为止,pyinstaller 已成功创建可在 Kali Linux 上运行的 .exe,但不适用于 Windows

这是Python代码

import webbrowser

webbrowser.open('http://www.cnn.com')

这是我在 Kali Linux 上运行的命令

~/Downloads/PyInstaller-3.2/pyinstaller.py --onefile --windowed --noupx open.py

当我在 Kali 中打开生成的 open.exe 时,它​​会打开 www.cnn.com。但如果我通过电子邮件发送此附件并在 Windows XP 中打开,它会询问

enter image description here

当我保存并尝试执行时,它显示.....如何解决此问题?

enter image description here

当我单击打开时,将显示以下内容。如何让它双击打开?

enter image description here

最佳答案

来自PyInstaller documentation :

If you need to distribute your application for more than one OS, for example both Windows and Mac OS X, you must install PyInstaller on each platform and bundle your app separately on each.

因此,要制作在 Windows 上运行的应用程序,您必须在 Windows 上使用 PyInstaller 创建它。

关于python - Kali 上的 Pyinstaller 为 Windows XP 创建 exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38601919/

相关文章:

python - 异步中的奇怪断言错误

python - 编码 Python 列表以使用 re 模块

linux - 如何使用 curl.h 在我的网络服务器上安装 git 没有这样的文件错误

windows - 如何从 powershell 脚本中调用 cmd batch

c++ - SetErrorMode 和/MDd (/MTd) 编译标志

python - 有没有一种简单的方法可以在扩展的 python 脚本中使用 "checkpoints"?

python - python 中 ttk TreeView 的 3 个不同问题

linux - 合并排序 gzip 文件

linux - 使用\1 保留模式 Bash 的一部分

windows - Git (Windows) - 从 separate-git-dir 存储库克隆失败