我创建了一个exe文件,在某些Windows机器上运行正常,在其他机器上运行失败。
我还没找到失败的原因。
重要数据:
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台没有的计算机。
我应该从哪里开始搜索?
答案 0 :(得分:8)
安装大约200个Windows更新后,错误消失了。
所需更新由KB2999226
解决答案 1 :(得分:1)
这里讨论了这个问题,而不是安装Windows Update https://github.com/pyinstaller/pyinstaller/issues/1566。截至今天(2017年5月9日),仍然没有坚定的解决方案。有两种解决方案适用于某些人:
安装Windows 10 SDK并将ucrt DDL dirs添加到系统路径(C:\ Program Files \ Windows Kits \ 10 \ Redist \ ucrt或C:\ Program Files(x86)\ Windows Kits构建之前\ 10 \ Redist \ ucrt \ DLLs \ x64,具体取决于您的系统)
使用Python 3.4构建而不是3.5 +