-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
netCDF4 conflicts with h5py on Windows #1214
Comments
I'm not an expert on wheels but I'm pretty sure that is b/c we have different HDF5 builds for the h5py and the netCDF4 ones. @isuruf, is there something we can do to mitigate that? For know I would recommend you to either build both from source, or to keep them in separate envs. |
Thanks for you recommendations. Can't keep the min separate envs, as they're needed in the same runtime. However, I could look into fording to build them from source. |
I'm getting ready to release new wheels for 1.6.2, so I could build with the same HDF5 version as h5py. What version is h5py using? Is it just a version issue, or is there something else incompatible in the build? |
AFAICT, hdf5 1.12.2 is used for all builds - so it must be more than just a version issue. |
@ocefpaf, the delvewheel relocated wheels shouldn't have this issue |
Good to know. We started using delvewheel in ocefpaf/netcdf4-win-wheels#4. If I did it correctly the 1.6.2 should be OK. @akeeman can you try a manual wheel installation from the artifacts in https://github.com/ocefpaf/netcdf4-win-wheels/releases/tag/v1.6.2? You may need to download the right Python version, unzip, and pip install it. If those work the next versions should be OK too. |
1.6.2 is up on pypi now @akeeman, can you try it and see if the conflict is resolved? |
Works like a charm. Thanks! |
No, that's not it. 1.6.1 had wheels without proper renaming of DLLs. 1.6.2 wheels renamed the DLLs prpoerly. |
Indeed. We started using delveheels only for the second one. It should be ok for >=1.6.2 now. @jswhit you may want to yank the 1.6.1. I can create a post release if necessary but I believe that the upgrade to 1.6.2 is better. |
the windows wheels for 1.6.1 have been deleted from pypi |
Can you point me to where the wheel name mangling is done? If my understanding is correct this was a problem because neither h5py nor netcdf4 were doing the mangling? |
We are using delvewheel now and Windows wheels >1.6.1 do not seem to have this issue. Before we had a custom script. Maybe this diff has all you need: https://github.com/ocefpaf/netcdf4-win-wheels/pull/4/files#diff-54cf74e113dd3f6d11e092fdb1d888ec82c69bdafbb15cfb6570c83ecad28f33L14-L18 |
The two libraries are not compatible with each other, as one cannot import them both within the same runtime.
I don't know whether h5py or netCDF4 is causing the problem. (same issue in h5py repo)
win10 + python 3.8.5 fails
win11 + python 3.8.10 fails
linux + python 3.8.15 works
Setup details
Import netCDF4, then h5py -> exits python
Import h5py, then netCDF4 -> raises ImportError
The text was updated successfully, but these errors were encountered: