gpt4 book ai didi

python - Caffe编译时没有看到hdf5.h

转载 作者:太空宇宙 更新时间:2023-11-04 12:39:05 25 4
gpt4 key购买 nike

我在 Python 上安装 Caffe 深度学习框架时遇到问题:

当我在 caffe 目录运行 make 命令时,它说

hdf5.h:no such directory

我做的步骤:

如果有人能帮助我,我将不胜感激。

错误信息:

CXX src/caffe/util/hdf5.cpp
in file include from src/caffe/util/hdf5.cpp:1:0:
./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
compilation terminated

Makefile:572 recipe for target '.build_release/src/caffe/util/hdf5.o'
failed Make:*** [.build_release/src/caffe/util/hdf5.o] Error 1

最佳答案

您安装的 Ubuntu 是什么版本?尝试这个。在您的 Makefile.config 中,尝试将 /usr/include/hdf5/serial/ 附加到 INCLUDE_DIRS:

--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/

并在Makefile中将hdf5_hlhdf5重命名为hdf5_serial_hlhdf5_serial :

--- LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+++ LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

有关错误修复的更多信息 here .

关于python - Caffe编译时没有看到hdf5.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55139410/

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