安装h5py:
sudo pip3 install cython
sudo apt-get install libhdf5-dev
sudo pip3 install h5py
安装完测试
python
import h5py
出现问题:\h5py__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
原因是h5py和numpy版本有冲突,h5py官方已修复合并到master分支,但还没发行新版本,在发行新版本之前可以用降级numpy的方法跳过这个问题。降级命令如下:
pip3 install numpy=1.13.0