Caffe安装中多版本protoc选择问题
来源:互联网 发布:手机乐器软件架子鼓 编辑:程序博客网 时间:2024/06/16 00:29
编译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
另清华大学开源软件镜像站
地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
阅读全文