教程:https://www.cnblogs.com/go-better/p/7160615.html
出错:python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory
解决办法:
sudo vim Makefile.config
#找到这条语句,然后要加一个local:
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/local/lib/python2.7/dist-packages/numpy/core/include
然后make pycaffe -j8
最后import caffe,若提示no module caffe,这里可能是路径问题
解决办法:在家目录下的.bashrc文件增加即可
export PYTHONPATH=/home/usrname/caffe/python:$PYTHONPATH #配置文件最后写入该路径,
source ~/.bashrc #生效