[Paraview-developers] ParaView 5.5.0-RC3 problem importing h5py?

Daan van Vugt daanvanvugt at gmail.com
Thu Mar 15 08:29:30 EDT 2018


Hi Jean,

Glad you solved this. I found it to be faster and less work to build the
right h5py instead of recompiling ParaView.
See https://github.com/Exteris/paraview-python-file-reader for instructions
(copied below for convenience).


# run this script in ParaView-5.4.1-Qt5-OpenGL2-MPI-Linux-64bit or
equivalent or set PV_DIR
export PV_DIR=$(pwd)

# Install python2 with ucs2
https://stackoverflow.com/questions/38928942/build-python-as-ucs-4-via-pyenv
export PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2
pyenv install -v 2.7.11
pyenv local 2.7.11

# Install pip
wget https://bootstrap.pypa.io/get-pip.py && ~/.pyenv/shims/python
get-pip.py

# Install the same numpy paraview uses (as of writing)
~/.pyenv/versions/2.7.11/bin/pip install --user numpy==1.8.1

# Install hdf5 of the same version as paraview (not enough files included
in binary paraview distribution to build against)
# Paraview 5.2 - 5.4.1 are using 1.8.13, I have not checked the rest
# We then take the install summary
cd ~
wget
https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/src/hdf5-1.8.13.tar.bz2
tar jxf hdf5-1.8.13.tar.bz2
cd hdf5-1.8.13
./configure
make -j
make install # in ~/hdf5-1.8.13/hdf5

# Install h5py against the paraview hdf5 libraries
export HDF5_DIR=~/hdf5-1.8.13/hdf5
~/.pyenv/versions/2.7.11/bin/pip install --no-binary=h5py --user h5py

# Copy it to your paraview folder to make a portable version, or leave it
in your local site-packages
mv ~/.local/lib/python2.7/site-packages/h5py
$PV_DIR/lib/python2.7/site-packages/
# Create symlinks to the paraview library files (since we built against
slightly different hdf5 the name is different)
cd $PV_DIR/lib/paraview-*
ln -s libhdf5.so.8.0.2 libhdf5.so.8
ln -s libhdf5_hl.so.8.0.2 libhdf5_hl.so.8

# Clean up
rm -r ~/hdf5-1.8.13.tar.bz2 ~/hdf5-1.8.13


Daan

On Thu, Mar 15, 2018 at 10:45 AM, Favre Jean <jfavre at cscs.ch> wrote:

>
> I have resolved the issue.
>
> PV5.4 uses HDF5 1.8.13 in VTK/ThirdParty/hdf5
> PV5.5 uses HDF5 1.10.1
>
> recompiling ParaView with -DVTK_USE_SYSTEM_HDF5:BOOL=ON ensures that I
> pick up a version of HDF5 compatible with what h5py imports.
>
> Thanks for listening. :-)
>
> Jean
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180315/77b7bf0d/attachment.html>


More information about the Paraview-developers mailing list