RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

在完成caffe 的编译安装后,python下执行import caffe报错:

SystemError: initialization of _caffe raised unreported exception
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

我解决的办法是修改Makefile.config中的PYTHON_INCLUDE路径,numpy(1.16.6)路径要与自己所用虚拟环境保持一致:

PYTHON_INCLUDE := /home/robot/anaconda3/include \
				  /home/robot/anaconda3/envs/zed/include/python3.5m \
				  /home/robot/anaconda3/envs/zed/lib/python3.5/site-packages/numpy/core/include

你可能感兴趣的:(caffe,python)