前言
网上好多文章写得很复杂(包括官方文档),其实使用Anaconda安装caffe非常简单,只需要以下几个步骤:
环境
- 操作系统:Linux version 3.10.0(Red Hat)
- Python版本:3.5.4
- anaconda:1.6.5
- conda: 4.3.30
安装步骤
- 安装Anaconda(这个强烈推荐!)
-
在终端敲入:
conda install -c anaconda caffe
-
选择特定的protobuf版本:
conda install protobuf=3.2
如果不输入这一句可能会报如下错误:ImportError: libprotobuf.so.12: cannot open shared object file: No such file or directory
使用
- 创建一个caffe环境:
conda create -n caffe python=3.5
(只需创建一次) - 启动caffe环境:
source activate caffe
- 关闭caffe环境:
source deactivate caffe
- 启动caff[……]