【Python】 module ‘h5py‘ has no attribute ‘File‘解决方案

产生报错信息

1
module 'h5py' has no attribute 'File'

的解决方法

1 普遍解决方案

可能与 pip 和 conda 的混用有关,先使用

1
pip uninstall h5py

再输入

1
conda install h5py

2 备用解决方案

通过 1 节中介绍的方式笔者并没有解决报错问题,这时采用先输入

1
pip3 uninstall h5py

再输入

1
pip3 install h5py

即可解决该问题

打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2022-2024 lgc0208@foxmail.com
  • 访问人数: | 浏览次数:

请我喝杯咖啡吧~

支付宝
微信