“Windows Error: provider DLL failed to initialize correctly” on import of cgi module in frozen wxpython app

前端 未结 3 787
遥遥无期
遥遥无期 2021-01-18 06:41

I have a user of a frozen wxpython app that gets the appended screenshot.

The error message is \"Windows Error: provider DLL failed to initialize correctly\"

3条回答
  •  -上瘾入骨i
    2021-01-18 07:12

    I think the minimal solution is to include the SYSTEMROOT environment variable in the Python subprocess.

    I have seen the problem when trying to load os.urandom:

    self._authkey = AuthenticationString(os.urandom(32)) WindowsError: [Error -2146893795] Provider DLL failed to initialize correctly

    It turns out that the _PyOS_URandom on Windows relies on the SYSTEMROOT environment to be set. See: http://bugs.python.org/issue1384175#msg248951 for a detailed explaination

提交回复
热议问题