Search code examples
pythonimporterrornuitkapython-standalone

Python code compiled to a standalone program with Nuitka reports win32file.pyd import error


Program compiled on Windows 10 amd64 machine fails to start on Windows server 2008R2 amd64 with error:

ImportError: LoadLibraryEx 'path\to\dist\folder\win32file.pyd' failed

Nuitka version: 0.5.29.1 stable


Solution

  • The root cause of the problem happened to be the same as described in this stackoverflow thread: Problem with loading win32file.pyd on python 2.6

    Solution was to remove MSWSOCK.dll from the dist directory