From b7bc3e990b9331d79e46c12c33c9b4a41955ad62 Mon Sep 17 00:00:00 2001 From: "Konstantin Briukhnov (Costa Bru)" Date: Wed, 16 Jun 2021 14:37:10 -0700 Subject: [PATCH] Update basics.rst Python 3.8+ Windows troubleshooting --- docs/basics.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/basics.rst b/docs/basics.rst index 0b1d85cfd..cbf7fa1ae 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -306,3 +306,17 @@ Supported data types A large number of data types are supported out of the box and can be used seamlessly as functions arguments, return values or with ``py::cast`` in general. For a full overview, see the :doc:`advanced/cast/index` section. + +Python 3.8+ Windows troubleshooting +=================================== +According to the python release notes document, DLL dependencies for *.pyd file doesn't search the directories +in PATH environment since Python 3.8 on Windows. + +That leads to the following, sometimes python cannot load pyd extension without any useful information provided. +Usually, it raises an error: +ImportError: DLL load failed: The specified module could not be found. + +To overcome it, you can try out https://github.com/lucasg/Dependencies tool. +It shows all dependencies your pyd file has at the moment. And, you will be able to locate +those dependency paths, register it via os.add_dll_directory("your dlls path") +right before importing your extension in your python script.