欢迎光临散文网 会员登陆 & 注册

Failed to execute script 'pyiboot01_bootstrap' due to unhandled

2023-03-04 00:30 作者:四十九C-137  | 我要投稿

原文地址:https://joessem.com/archives/pyiboot01_bootstrap.html

错误码:[3596] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!

现象

在 windows 10 机器上使用 pyinstaller 将 .py 程序打包成 .exe 文件,在其他 windows 10 机器上运行正常,在部分 windows 7 机器上运行时发生以下错误:

exe 文件构建时的环境为:

  • 操作系统:Windows 10;

  • python 版本:3.8.2

  • pyinstaller 版本:5.6.1

原因

在社区中翻了一些类似的问题:

#4213: Program fails at pyiboot01_bootstrap when using --noconsole
#4706: Failed to execute script pyi_rth_multiprocessing, ImportError on elder win7x86

发现问题很有可能出在 Windows 7 操作系统的补丁或者 python 版本上。因为自从 Windows 7 升级到 sp1 之后,想要使用 python 3.7+ 版本,就必须安装补丁 KB2533623 ,否则就只能使用 python 3.6 及以下版本。

解决方案

1)给需要运行该 exe 程序的 Windows 7 机器安装补丁 KB2533623  。

2)修改生成 exe 程序的环境,将 python 运行环境修改为 3.6。

试了第二种方法,将 python 的运行环境修改为 python 3.6.8,并将 pyinstaller 库版本修改为 4.10。然后再进行编译,生成的 exe 程序在 Windows 7 环境上运行已经不会再出现该错误。

本文使用 文章同步助手 同步


Failed to execute script 'pyiboot01_bootstrap' due to unhandled的评论 (共 条)

分享到微博请遵守国家法律