h5py: undefined symbol: H5Pset_fapl_ros3

To assist reproducing bugs, please include the following:

  • Operating System: Ubuntu 18 Docker
  • Python version: 3.8
  • Where Python was acquired: Conda
  • h5py version (e.g. 2.6): results in error
  • HDF5 version (e.g. 1.8.17): 1.10.6
  • The full traceback/stack trace shown (if it appears)

Dear everyone,

I am using a Docker container based on jupyter/minimal-notebook:latest. It already has a miniconda with Python 3. Next, I installed h5py (was a dependency of something else). However, when attempting to use it I get:

(sc-analysis) jovyan@7171d029a008:~$ python -c 'import h5py; print(h5py.version.info)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/conda/envs/sc-analysis/lib/python3.8/site-packages/h5py/__init__.py", line 33, in <module>
    from . import version
  File "/opt/conda/envs/sc-analysis/lib/python3.8/site-packages/h5py/version.py", line 15, in <module>
    from . import h5 as _h5
  File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: /opt/conda/envs/sc-analysis/lib/python3.8/site-packages/h5py/defs.cpython-38-x86_64-linux-gnu.so: undefined symbol: H5Pset_fapl_ros3

Do you have any idea? I can share the full container if required. Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I just hit this too (I’m also using Mamba). I worked around the issue for now by forcing h5py<3.2 in my environment.yml.

The error is due to the HDF5 library being used not matching the configuration h5py was built with. This sounds like whichever source(s) of libraries mamba is using, they’re not consistent (which is a mamba problem).

Update: This issue only occurs when installing the package with mamba (https://github.com/mamba-org/mamba), but not with Conda. Feel free to close if you think that it’s not your responsibility.

I am getting the same error at @tschaka1904 without mamba, from conda-forge. Installation from pip avoids the issue.

Also just ran into this: defs.cpython-38-x86_64-linux-gnu.so: undefined symbol: H5Pset_fapl_ros3

Seems like that this as a recent issue for me, as I was able to built it just fine a couple of weeks back. What’s the preferred workaround or even solution?