I had the same problem in the FEnics Docker container that I downloaded from the downloads page. To install meshio one would create a different docker image using the process mentioned in the FEnics Containers page.The contents of the Dockerfile using instructions here would look like,
FROM quay.io/fenicsproject/stable:current
USER root
RUN apt-get -qq update && \
apt-get -y upgrade && \
apt-get clean && \
pip install --upgrade pip && \
pip install meshio[all] && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER root
However this would give the error
ValueError: Invalid high library version bound (invalid high library version bound)
This is because the HDF5 version that ubuntu-18(container used by Fenics) installs by default is 1.10.0, which can be easily verified by the following command
dpkg -l | grep hdf5
ii libhdf5-100:amd64 1.10.0-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - runtime files - serial version
ii libhdf5-mpich-100:amd64 1.10.0-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - runtime files - MPICH2 version
ii libhdf5-mpich-dev 1.10.0-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - development files - MPICH version
But pip install meshio[all]
would install h5py-2.9 which would require HDF5-1.10.3 or above.The one h5py version that would work with this is 2.7.1.But installing this using pip gives the following error ,reasons for which I am unable to find out now.
Segmentation fault (core dumped)
So the workaround is installing h5py from ubuntu repository only to maintain continuity of versions.The Dockerfile could look like
FROM quay.io/fenicsproject/stable:current
USER root
RUN apt-get -qq update && \
apt-get -y upgrade && \
apt-get clean && \
apt-get -y install python3-h5py && \
pip install --upgrade pip && \
pip install meshio[all] && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER root
That solved the problem.Obviously, the workaround can be used in cases of direct installation .Just install h5py from official repository and follow usual steps as mentioned