PyInstaller lib not found

11,774

Solution 1

Just had this problem myself. The problem is that pyinstaller is not fully compatible Windows 10. The only solution currently is to download the Windows 10 SDK (a 2GB download).

See more here: https://github.com/pyinstaller/pyinstaller/issues/1566

Solution 2

I answered a question with a similar solution here: https://stackoverflow.com/a/56942695/10951987

When there is a whole slew of WARNINGS coming from pyinstaller about not being able to locate Windows DLLs, you might check to see if they're in one of the two following locations:

C:\Windows\System32\downlevel
C:\Windows\SysWOW64\downlevel

You can add one or both to the PATH variable, like so and those warnings should disappear:

set PATH=%PATH%;C:\Windows\System32\downlevel

I noticed some of the DLLs you're unable to locate are in the folders I called out above.

Note: this will work for any DLLs that you can track down on your machine. Add that directory to PATH so that pyinstaller can find them.

Share:
11,774
Admin
Author by

Admin

Updated on June 14, 2022

Comments

  • Admin
    Admin almost 2 years

    I made a simple python[3.5.2] program using tkinter. When I use pyinstaller[3.2] on it it gives me a ton of 'lib not found' warnings. Example:

    2999 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\python.exe

    3031 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\python.exe

    3218 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll

    3312 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll

    6494 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\DLLs_hashlib.pyd

    7271 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\unicodedata.pyd

    .bat file I use to make executables is

    @echo off

    set /p file_name="Enter file name: "

    pyinstaller %0..\%file_name%\%file_name%.py --onefile --windowed --distpath %0..\%file_name% --name=%file_name%

    del %file_name%.spec

    rmdir /s /q build

    echo.

    pause

    What am I doing wrong? Windows 10 64bit