We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Any ideas why __hdf5libversion__ wouldn't be available? Shall I put a try / except around it?
__hdf5libversion__
In [4]: import xarray as xr In [5]: xr.show_versions() --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in netcdf_and_hdf5_versions() 64 try: ---> 65 import netCDF4 66 libhdf5_version = netCDF4.__hdf5libversion__ ModuleNotFoundError: No module named 'netCDF4' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) <ipython-input-5-6f391305f2fe> in <module> ----> 1 xr.show_versions() /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in show_versions(file) 78 sys_info = get_sys_info() 79 ---> 80 sys_info.extend(netcdf_and_hdf5_versions()) 81 82 deps = [ /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in netcdf_and_hdf5_versions() 69 try: 70 import h5py ---> 71 libhdf5_version = h5py.__hdf5libversion__ 72 except ImportError: 73 pass AttributeError: module 'h5py' has no attribute '__hdf5libversion__'
I check I'm on the latest h5py:
pip install h5py -U Thu Jul 18 16:47:29 2019 Requirement already up-to-date: h5py in ./Library/Python/3.7/lib/python/site-packages (2.9.0) Requirement already satisfied, skipping upgrade: numpy>=1.7 in /usr/local/lib/python3.7/site-packages (from h5py) (1.16.4) Requirement already satisfied, skipping upgrade: six in ./Library/Python/3.7/lib/python/site-packages (from h5py) (1.12.0)
The text was updated successfully, but these errors were encountered:
Hmm, now I'm not sure that line ever worked. I may just copied the variable from netCDF4.
It think it should be h5py.version.hdf5_version, which has been around in h5py for quite a while, e.g., https://github.com/h5py/h5py/blob/2.0.0/h5py/version.py#L8 https://github.com/h5py/h5py/blob/2.9.0/h5py/version.py#L39
h5py.version.hdf5_version
But yes, let's catch AttributeError, too, just in case that changes in the future.
AttributeError
Sorry, something went wrong.
I think it must work under some setups, since it's tested. I changed and added a broader try / except
I don't think we have any CI configurations with h5py installed but not netCDF4.
No branches or pull requests
Any ideas why
__hdf5libversion__
wouldn't be available? Shall I put a try / except around it?I check I'm on the latest h5py:
The text was updated successfully, but these errors were encountered: