-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add explicit testing for hdf5dll.dll on Windows to improve diagnostics #146
Conversation
Sorry @mwiebe, I'm not an expert of ctypes, but it is not enough just using something like if not ctypes.util.find_libraty('hdf5dll.dll'):
raise ImportError('Could not load "hdf5dll.dll", please ensure'
' that it can be found in the system path') or try:
l = ctypes.CDLL('hdf5dll.dll')
except OSError:
raise ImportError('Could not load "hdf5dll.dll", please ensure'
' that it can be found in the system path')
else:
del l ? |
Yeah, those probably would work too, and be simpler. I'm not really an expert on ctypes either. |
Either way, I think that we should merge this fix in. @avalentino's is cleaner and would test it if I had a windows machine.... |
@mwiebe can you please confirm if at least one of the simplified version of the patch works for you? |
I've switched it to use the find_library function, which works on my machine. I also modified setup.py to automatically find the HDF5 directory if it's in the PATH, because I don't like having to set that manually. |
@mwiebe Much agreed. This looks good to me now. @avalentino Do you want to merge it in or should I? |
Done. It is now in the develop branch. |
Ran into this because of a bug in the HDF5 windows installer.