-
Notifications
You must be signed in to change notification settings - Fork 185
Fix failure to find libopenslide-0.dll on Windows #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Closed by mistake |
|
Yes but to no avail, I even tried doing so in a standalone script with ctypes.cdll.LoadLibrary in it - it still doesn’t work, but find_library continues to find the DLL. |
After hours (if not days) of research, this is the only fix working |
I also have this issue and looked how to fix it, Python changed the default behavior in 3.8 to no longer look in PATH when resolving DLL:s on Windows. In the what's new notes, they recommend using add_dll_directory() to resolve this issue or use an absolute path, but then you need to know where to look. The only reasonable way to search the PATH is to use find_library, if you want to protect against DLL hijacking, the project needs to deliver the win-DLL to a known location and not depending on it being in the PATH. See e.g. for another project's similar problem: beetbox/pyacoustid#54 So I think this is a good patch. |
Okay, yeah, the behavior change in 3.8 seems to explain it. Does the sample code in #115 (comment) work for you?
|
I pointed the path to the |
Hello maintainers, I was wondering when is this PR going to be merged :) thank you |
@alessiamarcolini On Python 3.8 and later, applications should use the new Since this PR bypasses the new Python API, I'll close. Thanks for sending! |
In issue #51 I suggested doing this; it was mentioned in issue #23 as well. On every machine, on which I tried installing the library, I had to edit this line.