Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

ImportError: DLL load failed: The specified module could not be found. #9

Open
Sverda opened this issue May 13, 2019 · 1 comment
Open
Labels

Comments

@Sverda
Copy link

Sverda commented May 13, 2019

Installing the library via: "pip install python-djvulibre==0.8.4" on the windows with all the prerequisites from documentation is not enough because I get an error when I try to import djvu.decode: "ImportError: DLL load failed: The specified module could not be found. "

@jwilk
Copy link
Member

jwilk commented May 16, 2019

Yeah, this is broken.

The problem is that the extensions modules are linked to DjVuLibre DLL, but this DLL is normally not in the search path.

As a work-around, you can call (undocumented) djvu.dllpath.set_dll_search_path() before importing djvu.decode or djvu.sexpr. This function queries the Windows registry for the directory where DjVuLibre is installed and adds it to the search path with SetDllDirectoryW.

@jwilk jwilk added the windows label Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants