ubuntu18.04 anaconda安装caffe报错pyconfig.h: No such file or directory

ubuntu18.04 anaconda安装caffe报错

In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from tools/caffe.cpp:2:
/usr/include/boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
 # include <pyconfig.h>
           ^~~~~~~~~~~~
compilation terminated.
Makefile:593: recipe for target '.build_release/tools/caffe.o' failed
make: *** [.build_release/tools/caffe.o] Error 1
make: *** Waiting for unfinished jobs....

解决方法:

make clean
export CPLUS_INCLUDE_PATH=/你的anconda路径/include/python2.7
export PYTHONPATH=/home/administrator/storage2/xxy/caffe-master/python
修改Makefile.config文件中

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include /home/administrator/anaconda3/envs/caffe2.7/include /usr/include/hdf5/serial /usr/local/cuda-10.0/include
为
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include /home/administrator/anaconda3/envs/caffe2.7/include/python2.7 /usr/include/hdf5/serial /usr/local/cuda-10.0/include
sudo make  -j8
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值