Skip to content
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

h5py error when using to_netcdf #2296

Open
jonsedar opened this issue Dec 10, 2023 · 1 comment
Open

h5py error when using to_netcdf #2296

jonsedar opened this issue Dec 10, 2023 · 1 comment

Comments

@jonsedar
Copy link

jonsedar commented Dec 10, 2023

Describe the bug

Really simple one I hope. When I try to write to_netcdf() I get

UserWarning: h5py is running against HDF5 1.14.3 when it was built against 1.14.2, this may cause problems

This is using a conda-forge based install

Crosspost from conda-forge/h5py-feedstock#122

To Reproduce

Really simple

idata.to_netcdf('filename.netcdf')

Additional context

Python implementation: CPython
Python version       : 3.10.13
IPython version      : 8.18.1

pymc    : 5.9.2
pytensor: 2.17.3

Compiler    : Clang 16.0.6 
OS          : Darwin
Release     : 23.1.0
Machine     : arm64
Processor   : arm
CPU cores   : 8
Architecture: 64bit

seaborn   : 0.12.2
pandas    : 2.1.4
arviz     : 0.16.1
numpy     : 1.25.2
oreum_core: 0.7.0
sys       : 3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:09:17) [Clang 16.0.6 ]
@OriolAbril
Copy link
Member

Is this on a fresh env?

I don't really see what can be done on ArviZ side other than waiting for the linked issue to be solved. For older arviz versions (like the one in the original issue) the situation is a bit trickier if you want to use h5py because both h5py and netcdf4 depend directly on hdf5 and so even using conda, they might be "fighting" each other and trying to use different hdf5 versions.

However, we recently switched from netcdf4 to h5netcdf (which depends on h5py and through that on hdf5) so unless you manually install hdf5 or netcdf4 there should never be multiple hdf5 versions around.

Note: h5py has roughly 10 times more downloads on pypi, and there are many libraries that depend on it, so having h5py+older-arviz installed in an env should be much more common than having newer-arviz+netcdf4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants