Fix PyInstaller Missing api-ms-win-crt-process-l1-1-0.dll Error – Python Tutorial

By | April 22, 2021

In this tutorial, we will introduce how to fix the error: Missing api-ms-win-crt-process-l1-1-0.dll when we are using pyinstaller to pack python to exe.

Question

We are using python pyinstaller to pack a pyqt5 application to 32 bit exe on windows 10. It can be run on win 7, win 8. However, it works well on win 10. But it reports missing api-ms-win-crt-process-l1-1-0.dll on win 7. How to fix?

Solution

We can add command option below:

-p "C:/Windows/System32/downlevel"

Here is an example:

pyinstaller --noconfirm --onefile --windowed --clean -p "C:/Windows/System32/downlevel" "main.py"

Fix PyInstaller Missing api-ms-win-crt-process-l1-1-0.dll Error - Python Tutorial

Run this command to pack python to exe, you will find this exe application can be run on win 7.

Leave a Reply