First time here? Check out the FAQ!

Revision history  [back]

Loading pyd files with Python 3.8

I need to use Mark Hammond's win32 tools with Python 3.8 on Windows 10. This worked with older Python versions, but trying to import win32process and other such modules fails with the unhelpful

builtins.ImportError: DLL load failed while importing win32process: The specified module could not be found.

These are pyd files.

I added the relevant directory using os.add_dll_directory and, for good measure, added these to sys.path, but that did not help.

Now, if I do

import win32process

in the Wing Python 3.8 shell, the import succeeds, but if I do this import in my code, even after os.add_dll_directory, it fails, so I am wondering how Wing makes this work so that I can add that technique to my code that needs to import this location.

Loading pyd files with Python 3.8

I need to use Mark Hammond's win32 tools with Python 3.8 on Windows 10. This worked with older Python versions, but trying to import win32process and other such modules fails with the unhelpful

builtins.ImportError: DLL load failed while importing win32process: The specified module could not be found.

These are pyd files.

I added the relevant directory using os.add_dll_directory and, for good measure, added these to sys.path, but that did not help.

Now, if I do

import win32process

in the Wing Python 3.8 shell, the import succeeds, but if I do this import in my code, even after os.add_dll_directory, it fails, so I am wondering how Wing makes this work so that I can add that technique to my code that needs to import this location.