TensorFlow 1.15.5编译依赖于h5py,而h5py安装依赖于hdf5库,因此需要安装hdf5库。
1 | cd /path/to/hdf5 |
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 |
1 2 | tar -zxvf hdf5-1.10.5.tar.gz cd hdf5-1.10.5/ |
1 | ./configure --prefix=/usr/include/hdf5 |
--prefix:用于指定hdf5安装路径,用户根据实际情况进行修改。此处路径设置为“/usr/include/hdf5”。
1 | make |
1 | make install
|
1 | export CPATH="/usr/include/hdf5/include/:/usr/include/hdf5/lib/" |
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 |