标签:span image lag path config edit 错误 dia nvidia
一、首先看看自己的系统,Ubuntu16.04,cpu,没有Nvidia,没有opencv
二、安装依赖包
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev sudo apt-get install libatlas-base-dev
三、下载Caffe
git clone git://github.com/BVLC/caffe.git
四、编译Caffe
cp Makefile.config.example Makefile.config
1)CPU_ONLY := 1(就把前面#去掉就行)
2)配置一些引用文件(增加部分主要是解决新版本下,HDF5的路径问题)(修改里面的内容)
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/lib/x86_64-linux-gnu/hdf5/serial/include LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
make all -j8 make test -j8 make runtest -j8
五、编译Python接口
Caffe拥有python\C++\shell接口,在Caffe使用python特别方便,在实例中都有接口的说明。
sudo apt-get install python-pip
for req in $(cat requirements.txt); do pip install $req; done
如果提示权限不够的话就是
for req in $(cat requirements.txt); do sudo pip install $req; done
make pycaffe
export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH
六、试验
$ python2.7 Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import caffe >>>
说明安装全部完成!
七、错误
pip install scikit-image
-其他错误就make clean后再make
【Caffe】Ubuntu16.04上配置安装caffe(Only CPU)
标签:span image lag path config edit 错误 dia nvidia
原文地址:http://www.cnblogs.com/tenderwx/p/7279106.html