I encountered this problem before, and after investigation, it was found that the h5py module version was too high;
uninstall the existing version and install a lower version of h5py.
Uninstall:
pip uninstall h5py
download:
pip install h5py==2.10 -i https://pypi.tuna.tsinghua.edu.cn/simple/