每当我尝试读取hdf5文件时,就会出现此错误:
OSError: Unable to open file (unable to open file: name = '/content/sample_data/data/hdf5_data/data_training.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)**
代码:
import h5py
with h5py.File('/content/sample_data/data/hdf5_data/data_training.h5', 'r') as f:
print(f)
解决方案:
!sudo apt-get install libhdf5-dev
!pip install h5py
import h5py
f = h5py.File('/content/data/hdf5_data/data_testing.h5', 'r')
f
输出:
目前没有回答
相关问题 更多 >
编程相关推荐