h5py / h5py

HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format.
http://www.h5py.org
BSD 3-Clause "New" or "Revised" License
2.08k stars 529 forks source link

"ImportError: h5py.defs does not export expected C function H5Pset_file_space_strategy" when importing h5py #2246

Open annazuckerman opened 1 year ago

annazuckerman commented 1 year ago

Hello, I have been able to import h5py using the standard import h5py until yesterday, when it suddenly began to produce an error. At first the error was: image I then tried updating h5py from version 2.10.0 to the latest version (3.8.0), but now I get a different error: image It is very strange that this error only started yesterday. Any advice on how to proceed would be much appreciated, and I apologize if the issue is on my end.

tacaswell commented 1 year ago

The paths of in the traceback are very suspcious. In the first case it looks like you are in a conda env some times and then local files later in the stack.

In the second error it looks like you are importing from as pip install --user installation.

All of this suggest that there are installation issues. I would suggest creating a new conda environment and clearing out anything in .local/lib/ that looks like a Python installation (unless you expect to have installed things there in which case be more surgical).


In the future please post copy-paste of text rather than screen shots. They are much easier to read and if we need to copy-paste from the content.

annazuckerman commented 1 year ago

Thank you for the insight. I will try this. I am running this on my school's supercomputer, so it is very likely that there are aspects of the environment I don't understand/didn't control. And I will note to avoid screenshots in the future.