Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the HDF5 Library

TensorFlow 1.15.5 compilation depends on h5py, and h5py depends on HDF5. Therefore, you need to install HDF5.

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the compilation path for HDF5 source code.
    1
    cd /path/to/hdf5
    
  3. Download the HDF5 source code to the server.
    1
    wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.gz --no-check-certificate
    
  4. Decompress the HDF5 source package and go to the decompressed directory.
    1
    2
    tar -zxvf hdf5-1.10.5.tar.gz
    cd hdf5-1.10.5/
    
  5. Perform the configuration.
    1
    ./configure --prefix=/usr/include/hdf5
    

    --prefix: specifies the HDF5 installation path. Change the path as required. /usr/include/hdf5 is used as an example.

  6. Perform the compilation.
    1
    make
    
  7. Perform the installation.
    1
    make install
    
  8. Configure the environment variable and create a soft link to the dynamic libraries.
    1. Set the environment variable.
      1
      export CPATH="/usr/include/hdf5/include/:/usr/include/hdf5/lib/"
      
    2. Create soft links to the dynamic libraries.
      1
      2
      ln -s /usr/include/hdf5/lib/libhdf5.so  /usr/lib/libhdf5.so
      ln -s /usr/include/hdf5/lib/libhdf5_hl.so  /usr/lib/libhdf5_hl.so
      

      Dynamic library soft links are automatically created during installation. If the soft links fail to generate automatically, run the preceding commands to create them manually.