Installing the HDF5 Library
TensorFlow 1.15.5 compilation depends on h5py, and h5py depends on HDF5. Therefore, you need to install HDF5.
- Use PuTTY to log in to the server as the root user.
- Go to the compilation path for HDF5 source code.
1cd /path/to/hdf5
- Download the HDF5 source code to the server.
1wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.gz --no-check-certificate
- 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/
- 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.
- Perform the compilation.
1make
- Perform the installation.
1make install - Configure the environment variable and create a soft link to the dynamic libraries.
- Set the environment variable.
1export CPATH="/usr/include/hdf5/include/:/usr/include/hdf5/lib/"
- 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.
- Set the environment variable.
Parent topic: Configuring the Compilation Environment