I have created an exe file which works fine on some Windows machines and fails on others.
I could not yet find the cause for failing.
Important data:
The DEBUG shows the following:
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
There is also an error message shown in a window:
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
When I copy all files from C:\temp_MEI55762 (where the bootloader has extracted all files) to the directory C:\temp\r (where mytool_debug.exe is located) and execute mytool_debug.exe it works.
As said mytool.exe works on other Windows 7/8 computers well. I have found 2 computers where it does not because of above error.
Where should I start searching?
After installing around 200 Windows updates the error is gone.
The required update is addressed by KB2999226
There's a discussion about this here working towards a build side solution rather than having to install the Windows Update: https://github.com/pyinstaller/pyinstaller/issues/1566 . As of today (9th May 2017) there's still no firm solution. There are 2 solutions that have worked for some people:
Install the Windows 10 SDK and add the ucrt DDL dirs to your system path (C:\Program Files\Windows Kits\10\Redist\ucrt or C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64 depending on your system) before building
Use Python 3.4 to build instead of 3.5+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With