繁体   English   中英

Pyinstaller onefile无法在某些Windows 7计算机上启动

[英]Pyinstaller onefile does not start on some Windows 7 machines

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

我还没找到失败的原因。

重要数据:

  • x64 exe
  • Windows 7的
  • Python 3.5.1
  • pyinstaller 3.0
  • onefile

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 \\ n(mytool_debug.exe所在的目录)并执行mytool_debug.exe时,它可以正常工作。

正如所说的mytool.exe在其他Windows 7/8计算机上运行良好。 由于上述错误,我找到了2台计算机。

我应该从哪里开始搜索?

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

KB2999226解决了所需的更新

这里有一个关于这个的讨论,正在努力构建一个解决方案,而不是必须安装Windows Update: https//github.com/pyinstaller/pyinstaller/issues/1566 截至今天(2017年5月9日),仍然没有坚定的解决方案。 有两种解决方案适用于某些人:

  • 安装Windows 10 SDK并将ucrt DDL目录添加到系统路径(C:\\ Program Files \\ Windows Kits \\ 10 \\ Redist \\ ucrt或C:\\ Program Files(x86)\\ Windows Kits \\ 10 \\ Redist \\ ucrt \\ DLLs在构建之前,取决于您的系统\\ x64

  • 使用Python 3.4来构建而不是3.5+

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM