You’ll need to add that missing dll to your app when building on Windows 10 if you want it to work on Windows 7. To do this:
First locate that dll. Use where api-ms-win-crt-runtime-l1-1-0.dll. It’s a system dll so it’s probably in the same place for everyone. Mine is at C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll.
Second add it to your package. If you’re using --onedir mode you can actually just copy/paste it in but this isn’t recommended for anything other than a quick experiment. To do it properly add --add-binary C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll;. to your PyInstaller xxx.py command (alter the path to the dll if yours differs).
Or if you use the spec file add binaries=[(shutil.which("api-ms-win-crt-runtime-l1-1-0.dll"), ".")] to the a = Analysis(...) section.
Not even on your Windows 10? That is odd. Do you know if a specific library is using it or if just a hello-world PyInstaller build gives that error? In theory you shouldn’t be able to run your code normally without it. I notice Conda brings a copy of that dll with it (actually it has it twice for some reason). If you are using Conda then conda activate before calling where ....
If you do have to download it you can check it’s genuine using the sha code. The ones I have hash to ( using certUtil -hashfile api-ms-win-crt-runtime-l1-1-0.dll ) a19acefa3f95d1b565650fdbc40ef98c793358e9 and f67bc165cefb119ad767b6bec27a1102c0fd2bac so I can vouch for anything that matches either of those. You can probably find a list somewhere on a Microsoft page somewhere…