Python 3.8.x has improved DLL search support available
So 3.8.x is now stricter in its DLL loading. DLLs beside the executable are no longer searched for by default. This causes various errors in the new ParaView Windows dashboard where I grabbed 3.8.1 since we should test that somewhere. This fails to load the vtkParallelMPI4Py
module because it can't find vtkParallelMPI4Py-pv5.7.dll
which is right beside pvpython.exe
. We'll need to do something about this in vtkPythonInterpreter
to add the executable directory to the PATH
on interpreter start or otherwise. This new function looks promising: os._add_dll_directory
:
os._add_dll_directory
path: path_t
Add a path to the DLL search path.
This search path is used when resolving dependencies for imported
extension modules (the module itself is resolved through sys.path),
and also by ctypes.
Returns an opaque value that may be passed to os.remove_dll_directory
to remove this directory from the search path.
The commit which changed things in upstream (added in 3.8.0a4): https://github.com/python/cpython/commit/2438cdf0e932a341c7613bf4323d06b91ae9f1f1#diff-fa4616621faa1cbc0e83ef8930bb3202
Cc: @utkarsh.ayachit @dgobbi @robertmaynard
Also: @jcfr @thewtex I don't know if you have an ITK-specific interpreter, but this likely affects you if so.
(Side note: this finally happened https://github.com/python/cpython/commit/24fe46081be3d1c01b3d21cb39bc3492ab4485a3)