【发布时间】:2021-12-03 20:59:36
【问题描述】:
使用 Pyinstaller 构建我的应用程序后,.exe 文件在我的开发 PC(Windows 10 64 位)上运行没有问题。如果尝试在我的另一台 PC(也是 Windows 10 64 位)上运行该程序,我会收到错误消息:
.
我已经尝试过一个文件和文件夹选项。
我正在使用这个 Pyinstaller 命令:
pyinstaller --noconfirm --onedir --windowed --icon "C:/gui/exe/stopwatch.ico" --exclude-module _bootlocale "C:/gui/exe/rt50.py"
代码可以从这里下载:https://www.racetiming.dk/dev/rt50.py
我真的希望有人可以帮助我。
【问题讨论】:
-
尝试从命令提示符运行exe并检查错误。
-
这将需要我返回并使用 onefile 选项,因为我不想在“生产”PC 上安装 Python。我会尽快尝试并返回。
-
我建议您使用 autopy2exe,因为它们使附加 .ico 文件变得容易
-
我尝试制作一个文件版本并运行它 - 但它除了弹出消息之外没有其他错误:-(
-
@chess_lover - 我曾尝试使用 auto-py-to-exe,但会产生新问题,甚至无法生成输出文件。
标签: python windows tkinter pyinstaller tkcalendar