You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently the Python Software Foundation in a moment of pure brilliance decided to break DLL resolution in Python 3.8+
"it's not a bug; it's a feature": https://bugs.python.org/issue43173
In 3.8+, the search path for the dependent DLLs of a normally imported extension module includes the following directories:
the loaded extension module's directory
the application directory (e.g. that of python.exe)
the user DLL search directories that get added by
SetDllDirectory() and AddDllDirectory(), such as with
os.add_dll_directory()
%SystemRoot%\System32
If possible, the simplest approach is to put dependent DLLs in the same directory as the extension module.
Well… It’s probably time to follow what the Python devs say:
If your application relies on [DLL loading], you should check for add_dll_directory() and if it exists, use it to add your DLLs directory while loading your library.
We’ve added a WEASYPRINT_DLL_DIRECTORIES environment variable to list folders where the DLL files can be found. Python 3.8+ will look there to find the libraries. The default value is the default folder of the GTK3 installer.
Apparently the Python Software Foundation in a moment of pure brilliance decided to break DLL resolution in Python 3.8+
"it's not a bug; it's a feature": https://bugs.python.org/issue43173
More details:
#589 (comment)
The text was updated successfully, but these errors were encountered: