SlicerCAT error with hdf5

I think the problem is that there are too many HDF5 libs (ITK, VTK, h5py, netCDF4)

In my SlicerCAT I build HDF5 as external project and set it to VTK and ITK. So my system has only one instance of HDF5.
I just reproduced your “fail” steps on my SlicerCAT on clean Ubuntu 22.04:

pip_install("h5py")
pip_install("netcdf4")
import h5py
import netCDF4

and it didn’t crash:

SlicerCAT is built upon Slicer 564ccb319c099d3772a74aea974d6e29075c7593 (14 may 2022)

Lately we had a conversation with @lassoan that it would be good to build HDF5 as an external project.
It is not a problem but don’t have time for this now.

In the future I will add a PR.

If you can’t wait (one-two months I think) you can take a look how I configured External_VTK.cmake and External_ITK.cmake. And there you can find External_HDF5.cmake but it probably should be modified to allow building against specific HDF5 version (probably you would want h5py to work with the same HDF5 version)

1 Like