caffe编译 `make pytest` 出错:`fatal error: 'pyconfig.h' file not found`

找到你的pythonfig.h的位置,Mac下可以使用命令:

locate pyconfig.h

得到位置:/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h

然后在当前终端中输入(要对应地址):

export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/include/python2.7/"

不再出现该错误。

你可能感兴趣的:(caffe编译 `make pytest` 出错:`fatal error: 'pyconfig.h' file not found`)