[issue42339] official embedded Python fails to import certain modules

Jelle Geerts report at bugs.python.org
Sat Nov 14 06:43:44 EST 2020


Jelle Geerts <jellegeerts at gmail.com> added the comment:

Problem still occurs with newer KB3118401 installed (instead of KB2999226).

But good news:

Installing update KB3063858 (or the older KB2533623) resolves the issue.

That update adds the new kernel32.dll functions SetDefaultDllDirectories, AddDllDirectory, and RemoveDllDirectory.

That explains why the issue didn't occur with (embedded) Python 3.7, since Python started using those functions since 3.8 if I recall correctly.

So, this issue can be considered solved. But...

Thinking along here, maybe there's a list of updates (or FAQ) to which you want to add KB3063858?

(Note of course it only affects Windows 7 users that use the embedded Python 3.8, and it doesn't affect 3.7 users and 3.9 doesn't support Windows 7.)

Or, maybe even add a bit of logic that detects when Python fails to load one of the _xxxx.pyd PE images (like _socket.pyd) and show a simple warning that tells users to check said FAQ? Or maybe that's asking too much.

Just some thoughts.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42339>
_______________________________________


More information about the Python-bugs-list mailing list