This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem with h5py (error: libhdf5.so: cannot open shared object file: No such file or directory)

I have a problem with h5py. I'm trying to install a package (P.E.P.P.E.R), but when trying to install, it will give an error.

 error: libhdf5.so: cannot open shared object file: No such file or directory

This is an error I've seen a lot, which I tried fixing with these blogs first. But I cant seem to fix it. So I'm hoping one of you can give me the answer im looking for.

What I tried so far:

conda install -c anaconda h5py

pip install h5py

sudo apt-get install pkg-config libhdf5-100 libhdf5-dev

sudo apt-get install -y libhdf5-dev

I'm using anaconda, WSL (ubuntu), and VCS with python 3.10.9 in a local env.

The complete error log:

      × python setup.py bdist_wheel did not run successfully.
      │ exit code: 1
      ╰─> [66 lines of output]
          /home/stanaanhane/anaconda3/envs/SNPcalling/pepper/venv/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
            warnings.warn(
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build/lib.linux-x86_64-3.10
          creating build/lib.linux-x86_64-3.10/h5py
          copying h5py/ipy_completer.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/highlevel.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/__init__.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/version.py -> build/lib.linux-x86_64-3.10/h5py
          creating build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/filters.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/selections.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/__init__.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/vds.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/dims.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/files.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/compat.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/base.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/group.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          creating build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_base.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/__init__.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_group.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/common.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-3.10/h5py/tests
          creating build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/__init__.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          running build_ext
          Loading library to get version: libhdf5.so
          error: libhdf5.so: cannot open shared object file: No such file or directory
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for h5py
      Running setup.py clean for h5py
    Failed to build h5py
    Installing collected packages: h5py, coloredlogs, visdom, onnxruntime, bson, torchnet, hyperopt
      Running setup.py install for h5py ... error
      error: subprocess-exited-with-error

      × Running setup.py install for h5py did not run successfully.
      │ exit code: 1
      ╰─> [68 lines of output]
          /home/stanaanhane/anaconda3/envs/SNPcalling/pepper/venv/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
            warnings.warn(
          running install
          /home/stanaanhane/anaconda3/envs/SNPcalling/pepper/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
            warnings.warn(
          running build
          running build_py
          creating build
          creating build/lib.linux-x86_64-3.10
          creating build/lib.linux-x86_64-3.10/h5py
          copying h5py/ipy_completer.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/highlevel.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/__init__.py -> build/lib.linux-x86_64-3.10/h5py
          copying h5py/version.py -> build/lib.linux-x86_64-3.10/h5py
          creating build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/filters.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/selections.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/__init__.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/vds.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/dims.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/files.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/compat.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/base.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          copying h5py/_hl/group.py -> build/lib.linux-x86_64-3.10/h5py/_hl
          creating build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_base.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/__init__.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_group.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/common.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-3.10/h5py/tests
          copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-3.10/h5py/tests
          creating build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/__init__.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds
          running build_ext
          Loading library to get version: libhdf5.so
          error: libhdf5.so: cannot open shared object file: No such file or directory
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: legacy-install-failure

    × Encountered error while trying to install package.
    ╰─> h5py

Thank you in advance!

package software installation wsl ubuntu python

0 answers

No answers yet.

Log in to answer this question.