PyInstaller WARNING: lib not found

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 mention this because it's easier than finding and copying the DLLs to a folder on the path like Alex F mentioned. I also noticed some of the DLLs you're unable to locate are in the folders I called out above.


I found the DLL's in system32/downlevel and syswow64/downlevel and copied all of them to the respective parent folders (system32 and syswow64). Something that Ritesh Singh's command will do. Try a restart after copying if it still does not work.

EDIT: As mentioned in comments, using set PATH=%PATH%;C:\Windows\System32\downlevel; before using pyinstaller or adding the downlevel folders to path in env variables might be a better idea.(not tested)


I just added the path in the environmental variable, it worked for me.

C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64

(or)

C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86


26095 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\user\appdata\local\programs\python\python36-32\DLLs\select.pyd

Search in C: drive for dll and set the path in pyinstaller command. The below command fixed the above pyinstaller error in windows 10:

pyinstaller --paths C:\Windows\WinSxS\x86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_10.0.17134.1_none_50c6cb8431e7428f hello.py