windows - Pyinstaller onefile 在某些 Windows 7 机器上无法启动

标签 windows pyinstaller

我创建了一个 exe 文件,它在某些 Windows 机器上运行良好,但在其他机器上运行失败。

我还找不到失败的原因。

重要数据:

  • x64 可执行程序
  • Windows 7
  • python 3.5.1
  • pyinstaller 3.0
  • 一个文件

DEBUG 显示如下:

C:\temp\r>mytool_debug.exe
PyInstaller Bootloader 3.x
LOADER: executable is C:\temp\r\mytool_debug.exe
LOADER: homepath is C:\temp\r
LOADER: _MEIPASS2 is NULL
LOADER: archivename is C:\temp\r\mytool_debug.exe
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to C:\temp\_MEI55762
LOADER: Setting up to run child
LOADER: Creating child process
LOADER: Waiting for child process to finish...
PyInstaller Bootloader 3.x
LOADER: executable is C:\temp\r\mytool_debug.exe
LOADER: homepath is C:\temp\r
LOADER: _MEIPASS2 is C:\temp\_MEI55762
LOADER: archivename is C:\temp\r\mytool_debug.exe
LOADER: SetDllDirectory(C:\temp\_MEI55762)
LOADER: Already in the child - running user's code.
LOADER: manifestpath: C:\temp\_MEI55762\mytool.exe.manifest
LOADER: Activation context created
LOADER: Activation context activated
LOADER: Python library: C:\temp\_MEI55762\python35.dll
Error loading Python DLL: C:\temp\_MEI55762\python35.dll (error code 127)
LOADER: Back to parent (RC: -1)
LOADER: Doing cleanup
LOADER: Freeing archive status for C:\temp\r\mytool_debug.exe

窗口中还会显示一条错误消息:

Entry Point Not Found

The procedure entry point ucrtbase.terminate could not be located in the dynamic link library api-ms-win-crt-runtime-l1-1-0.dll 

当我将所有文件从 C:\temp_MEI55762(引导加载程序已提取所有文件)复制到目录 C:\temp\r(mytool_debug.exe 所在的位置)并执行 mytool_debug.exe 时,它​​起作用了。

如前所述,mytool.exe 在其他 Windows 7/8 计算机上运行良好。我发现有 2 台计算机由于上述错误而无法运行。

我应该从哪里开始搜索?

最佳答案

安装大约 200 个 Windows 更新后,错误消失了。

所需的更新由 KB2999226 解决

关于windows - Pyinstaller onefile 在某些 Windows 7 机器上无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34218333/

相关文章:

python - Python 3.6.6 上模块 sys 没有 _MEIPASS 成员错误

java - 使用 Gradle 构建 Python 应用程序

python - PyInstaller -- 从脚本添加数据

c++ - gtkmm 3 窗口 64 位

c++ - 我需要一个不会弄乱我打开的窗口的消息泵

c# - 系统托盘中的 Winforms 通知图标重复

python - 在 Linux 上将 Python 编译为 .EXE 而不是 .ELF

c++ - 如何以编程方式将控制台字体设置为 Lucida?

c++ - 如何将 OpenCV 窗口设置为点击窗口?

python - 为什么 python 可执行文件在 Windows 上调用多处理模块的函数时打开新窗口实例