caffe 安装问题小总结(make pycaffe)
1\ Make pycaffe -j8编译报错
gedit ~/.bashrc打开文件,最后面加入 自己的路径
export PYTHONPATH=/home/hyhuang/下载/caffe/python
source ~/.bashrc,生成修改
错误修改1,caffe目录下,进入Python环境
python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: 没有那个文件或目录
先sudo apt-get install python-numpy,重新更新下numpy,不行,看配置文件路径
caffe目录下,进入Python环境
numpy.get_include()得到,python 路径
打开 gedit Makefile.config
修改上述路径路径,PYTHON_INCLUDE := /usr/include/python2.7
/usr/lib/python2.7/dist-packages/numpy/core/include
2\错误出现 import caffe 错误,没有这个模块
Import sys
sys.path.append("/home/sd/caffe/python") (添加caffe下的Python路径)
报 No module named skimage.io
安装依赖包
sudo apt-get install python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython ipython
此时问题可以解决
11.16日
[.build_release/tools/upgrade_net_proto_binary.bin] Error 1
进入到下载的caffe目录
在 Makefile 文件中
找到 :LIBRARIES += boost_thread stdc++
替换为:LIBRARIES += boost_thread stdc++ boost_regex
/usr/bin/ld: warning: libjpeg.so.9, needed by /home/w/anaconda2/lib/libopencv_imgcodecs.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libpng16.so.16, needed by /home/w/anaconda2/lib/libopencv_imgcodecs.so, not found (try using -rpath or -rpath-link
发现是找不到libpng16.so.16与libjpeg.so.9文件.打开anaconda中的…anaconda2/lib路径,发现anaconda下有libpng16.so.16与libjpeg.so.9,于是进行如下操作:
sudo ln -s ~/anaconda2/lib/libpng16.so.16 /usr/lib/
sudo ln -s ~/anaconda2/lib/libjpeg.so.9 /usr/lib/
sudo ldconfig
caffe make runtest 时:
error while loading shared libraries: libopencv_core.so.3.4
解决:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
转载原文: https://blog.csdn.net/LBJ_python/article/details/83783278