caffe安装记录

 

 

安装pycaffe
1.在caffe-master/python 下有一个requirement.txt,里面有所需要安装的所有库。

cd caffe-master/python
for req in $(cat requirements.txt); do pip install $req; done

2.CXX/LD -o python/caffe/_caffe.so .build_release/src/caffe/layers/python_layer.o
python/caffe/_caffe.cpp:11:10: fatal error: numpy/arrayobject.h: 没有那个文件或目录
 #include <numpy/arrayobject.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:535: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1

解决方法:

需要安装 python-numpy
sudo apt-get install python-numpy

3.ImportError: No module named caffe

解决方案:把caffe目录下的python目录,添加到环境变量中

export PYTHONPATH=/work/project/caffe/python:$PYTHONPATH

上一篇:linux – caffe:/usr/bin/ld:找不到-lcblas


下一篇:caffe+matlab=matcaffe安装实践