Caffe安装中多版本protoc选择问题

编译caffe时

问题:

 

In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
 #error This file was generated by a newer version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
 #error incompatible with your Protocol Buffer headers.  Please update


原因:我用python去编译caffe时缺少protoc, 我conda install protobuf. 所以电脑在有两个protoc。

 

解决:

参考:http://blog.csdn.net/elysion122/article/details/64523339

            http://blog.csdn.net/a237072751/article/details/78716778

若想用/usr/bin/protoc则:

 

若使用anaconda中的,则:

 

如果选择/usr/bin/protoc,在编译pycaffe时又想用anconda,那只能把anconda的protoc装成和系统一个版本

直接用conda install protobuf-2.6.1会出现找不到源的问题,

用命令:

conda install -c anaconda protobuf=2.6.1

 

如果还是找不到源

 

binstar search -t conda protobuf

假设使用protobuf-3.5.1版本,找到

 

然后用

 

binstar show conda-forge/protobuf


找到地址链接

 

然后终端输入

 

conda install --channel https://conda.anaconda.org/conda-forge protobuf


安装

 

 

清华大学开源软件镜像站

 

 

地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值