-
Notifications
You must be signed in to change notification settings - Fork 45
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
ImportError: DLL load failed: The specified module could not be found on Windows #193
Comments
More info: I tried this manually on a Windows Server 2019 system:
The wheel package installs but import still errors out in the same way. How are the supplied wheel packages built and what libraries do they require ? |
The DLLs for KfW are probably what's missing. I really wish DLL errors would actually tell you which one haha. @frozencemetery, it probably would be a good idea to check for the DLLs in |
After looking at your project (tcms-api), I would warn you to be careful. Windows SSPI (which is what winkerberos is for) doesn't have the same requirements as GSSAPI and compatibility can be an issue. This repository is specifically for providing the GSSAPI spec in Python and we use MIT Kerberos for Windows, not the built in Windows SSPI. This makes this library useful for connecting to GSSAPI services (like Kerberos secured Hadoop) from Windows where they (probably) may not be configured in a way that plays nice with Windows SSPI. I added the Windows support to interface with Kerberos secured Livy, HBase, and Phoenix. I was previously using a custom pykerberos because winkerberos always yielded GSSAPI mechanism errors from the server side, but building it required a bit too many hacks. |
I will try this out. I don't remember if I did. I will follow up with the updates in a few days.
I think this should be fine in my case. The tcms-api project is a client side library talking to a Linux web server, which is supposed to be secured via MIT Kerberos. Thanks for pointing this out, it's probably worth documenting on my side. |
Hi @atodorov, any updates here? |
Nope. As I said, I will give it a try and comment when I have the time. |
I did some digging today and here's what I got:
|
It's a 64bit system so I suspect it should load |
I really don't understand why it can't tell us which DLL, haha. The good news is I was able to reproduce it in a VM and it seems to be a 3.8 specific issue where it doesn't search the PATH for DLLs. I was able to get it working fine if I preloaded The bad news is that once I learned this, I quickly found that not searching the path is a security feature introduced for 3.8 as a part of dropping Windows 7 support: https://bugs.python.org/issue36085 Looks like on 3.8+ we need to use |
@atodorov This should be fixed in master. Can you give it a try and let us know? The fix is completely in Python space, so you can just grab the updated You can also, of course, just build from scratch, but that can be pain on Windows which is why we provide the wheels. |
@aiudirog - I tried the new files and they work for me. |
Awesome! If I understand correctly, that means the issue is fixed, so closing this. |
I fixed the issue by installing this http://web.mit.edu/kerberos/dist/#krb5-1.20 64-bit MSI Installer kfw-4.1-amd64.msi Requires restart. |
What went wrong?
Trying to use gssapi on Windows seems to fail:
How do we reproduce?
import gssapi
seems to be enoughComponent versions (python-gssapi, Kerberos, OS / distro, etc.)
gssapi-1.6.2, pip install - downloads the wheel package, Windows.
Logs at:
https://ci.appveyor.com/project/atodorov/tcms-api/builds/31627921/job/3tbk1ike6er25tmd
Feels like something is missing but I don't know what. Works perfectly fine on Linux.
Update: looks like #188 but I couldn't figure out what the solution was.
The text was updated successfully, but these errors were encountered: