I keep getting 'Pybind11: "ImportError: DLL not found" ' - what does this mean?

Asked 2 years ago

I'm building a relatively large Python project that has multiple libraries, and I keep getting the message: "ImportError: DLL not found". Is it a directory-related problem? Thanks

Kole Delacruz

Friday, October 07, 2022

The problem arises because Windows searches for all of the DLLs in th same directory. So, if you've got DLLs that are outside of the system /users directory, Python won't recognize them. A simple fix would be adding the following line of code: "os.add_dll_directory(...)" and then importing your .pyd module.





Write an answer...

Cancel

Please follow our  Community Guidelines

Can't find what you're looking for?