PyInstaller with Python 3.6 and PySide2 fails on Windows 10

Pyinstaller spits out warnings lthat it could not find libraries like api-ms-win-core-* and api-ms-win-crt-*. This leads to an executable working on windows 10, even on a new machine, but not on earlier versions as pyinstaller fails to bundle the needed files.

The fix is quite simple:

  1. Download Visual Studio 2017 community from microsoft website
  2. Install following components:
    Windows Universal CRT SDK
    Windows 8.1 SDK
    VC++ 2015.3 v140 toolset for desktop
    Windows Universal C Runtime
  3. When invoking pyinstaller use
    –path "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86"

Done 🙂

well the path is for the 32bit libraries, guess what, replace DLLs\x86 with DLLs\x64 when using python 64bit

OR install Visual C++ 2017 Redist package on the destination machine.

If the packaged application still does not run please install the mentioned redist package

See what GPO is applied to your machine and user

hello,

to see which GPO is apploed to your machine/user, you can use following commands inside the terminal:

  • check your GPO applied for your user:

    # gpresult /scope user /r
  • check the applied GPO for the machine:

    # gpresult /scope computer /r

Please note that you can get an "access denied." message when querying the machine GPO. Use a terminal with elevated rights to do this. E.g. execute the command-line as admin.

To view the applied values in your GUI you can use the tool rsop.msc