码迷,mamicode.com
首页 > 其他好文 > 详细

virtualenv 下安装caffe教程

时间:2016-04-07 00:57:13      阅读:803      评论:0      收藏:0      [点我收藏+]

标签:

 1.首先安装依赖环境,

% sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev
% sudo apt-get install --no-install-recommends libboost-all-dev
% sudo apt-get install python-dev python-pip python-numpy gfortran

2.然后创建 virtual --system-site-packages caffe-env,执行 source bin/activate,

3.运行 for req in $(cat requirements.txt); do pip install $req; done 安装python需求环境

4.进入caffe文件夹,修改Makefile.config,将PYTHON_INCLUDE和PYTHON_LIB 修改为caffe-env中的路径

5.并修改环境变量:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/caffe/build/lib # contains libcaffe.so
$ export PYTHONPATH=$PYTHONPATH:/path/to/caffe/python
6.然后 make -j8| make test -j8 | make runtest


virtualenv 下安装caffe教程

标签:

原文地址:http://www.cnblogs.com/deepcoding/p/5361606.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!