gpt4 book ai didi

python - 导入 h5py 时出错

转载 作者:太空狗 更新时间:2023-10-30 00:55:16 26 4
gpt4 key购买 nike

我一直在尝试导入 h5py 来读取这种类型的文件。

这是我的代码:

import h5py

file_1 = h5py.File("Out_fragment.h5py")

print file_1

输出是:

Traceback (most recent call last):
File "./week11.py", line 17, in <module>
import h5py
ImportError: No module named h5py

我也使用 pip install h5py 来获取这个模块,但我不确定为什么它似乎没有正确安装。

谢谢。

最佳答案

在 Ubuntu 上。您可以尝试以下三个命令:

  1. sudo pip install cython
  2. sudo apt-get install libhdf5-dev
  3. sudo pip install h5py

来源:https://github.com/fchollet/keras/issues/3426

关于python - 导入 h5py 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29831052/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com