error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
最近安装caffe,突然报这个错:
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_mean_file(const char*)’:
.build_release/src/caffe/proto/caffe.pb.h:17957:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_mean_file(const char*, size_t)’:
.build_release/src/caffe/proto/caffe.pb.h:17964:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘std::string* caffe::ImageDataParameter::mutable_mean_file()’:
.build_release/src/caffe/proto/caffe.pb.h:17971:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘std::string* caffe::ImageDataParameter::release_mean_file()’:
.build_release/src/caffe/proto/caffe.pb.h:17978:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h:17982:47: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_allocated_mean_file(std::string*)’:
.build_release/src/caffe/proto/caffe.pb.h:17987:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h:17995:47: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::clear_root_folder()’:
.build_release/src/caffe/proto/caffe.pb.h:18054:24: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_root_folder(const string&)’:
.build_release/src/caffe/proto/caffe.pb.h:18064:24: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
发现又是protoc的版本不对。
查了下:
sensetime@sensetime-To-be-filled-by-O-E-M:/home/zenggq/mainspace/mscnn$ which protoc
/usr/bin/protoc
sensetime@sensetime-To-be-filled-by-O-E-M:/home/zenggq/mainspace/mscnn$
sensetime@sensetime-To-be-filled-by-O-E-M:~/zenggq/caffe-bak$ pip show protobuf
Name: protobuf
Version: 3.3.0
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: protobuf@googlegroups.com
Author-email: protobuf@googlegroups.com
License: 3-Clause BSD License
Location: /home/sensetime/anaconda2/lib/python2.7/site-packages
Requires: six, setuptools
sensetime@sensetime-To-be-filled-by-O-E-M:~/zenggq/caffe-bak$
protoc --version
发现是2.5.0
索性把anaconda2下的protoc文件覆盖/usr/bin/protoc。
搞定。
error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’的更多相关文章
- (原)python中import caffe提示no module named google.protobuf.internal
转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5993405.html 之前在一台台式机上在python中使用import caffe时,没有出错.但是 ...
- caffe安装编译问题-ImportError: No module named google.protobuf.internal
问题描述 ~/Downloads/caffe$ python Python (default, Dec , ::) [GCC ] on linux2 Type "help", &q ...
- caffe搭建--缺少 skimage-缺少 google.protobuf.internal.-caffe搭建--ipython--ubuntu16.04+ caffe+ ipython
mkdir build && cd build cmake .. make pycaffe -j4 sudo vim /etc/profile---- export PYTHONPAT ...
- mac安装protobuf2.4.1时报错./include/gtest/internal/gtest-port.h:428:10: fatal error: 'tr1/tuple' file not found和google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template
通过网上下载的protobuf2.4.1的压缩文件,然后进行安装,./configure和make时遇到了两个问题. 正常的安装步骤如下: ./configure make make check m ...
- ImportError: No module named google.protobuf.internal
下载: protobuf-3.3.0 设置路径:export PYTHONPATH=/gruntdata/lihaiyang/local/protobuf-3.3.0/python:$PYTHONPA ...
- win10下Import caffe时出现“ImportError: No module named google.protobuf.internal”的解决办法
解决方法:只要出现和protobuf相关的错误,只要在cmd中输入pip install protobuf,然后等待安装完成即可. ps:这时,可能会出现"pip 不是内部命令"之 ...
- google protobuf 使用示例
定义.proto接口文件 package tutorial; message Person { required ; required int32 id = ; //unique ID number ...
- Windows下编译Google.Protobuf在Qt(C++)中使用与Unity3d(C#)交互
1.首先从Github-Protobuf下载代码,本文下载的版本号是3.1.0. 2.仔细查看各个README,有相关的资源下载和编译说明. 3.在一个方便的地方创建一个Install类型的文件夹,放 ...
- google protobuf使用
下载的是github上的:https://github.com/google/protobuf If you get the source from github, you need to gener ...
随机推荐
- python接口自动化测试(一)-request模块
urllib.request模块是python3针对处理url的. 1. 首先导入: from urllib import request 2. 构造url,构造url的headers信息和传参[re ...
- ChIP-seq motif ROC 相关资料
[怪毛匠子]独家整理 不可以转载 MEME工具 http://meme-suite.org DNA motif 搜索算法总结 http://www.bbioo.com/lifesciences/40- ...
- GoogLeNet 之 Inception-v1 解读
本篇博客的目的是展示 GoogLeNet 的 Inception-v1 中的结构,顺便温习里面涉及的思想. Going Deeper with Convolutions:http://arxiv.or ...
- OpenCV中图像的格式Mat 图像深度
opencv中图像的格式Mat 有图像的定义,图像深度.类型格式等,其中Mat的参数depth为深度,深度反应出图像颜色像素值: 关于数据的储存:(转) Mat_<uchar>对应的是CV ...
- Codeforces1062A. A Prank(暴力)
题目链接:传送门 题目: A. A Prank time limit per test second memory limit per test megabytes input standard in ...
- python 不同进程间通信
from multiprocessing import Process,Queue import os def f (qq): qq.put([42,None,'hello']) #将列表传入队列qq ...
- C# 左右补零
//不够4位补零 public static string addZero(int val) { string str = val + ""; int strLen = str.L ...
- zabbix 与 nginx (五)
zabbix监控nginx的大概流程为: 1:被监控端的nginx开启stub_status模块 2:通过脚本的方式获取nginx的状态值 3:修改被监控端的配置文件,Userparameter= ...
- 【转】剖析异步编程语法糖: async和await
一.难以被接受的async 自从C#5.0,语法糖大家庭又加入了两位新成员: async和await. 然而从我知道这两个家伙之后的很长一段时间,我甚至都没搞明白应该怎么使用它们,这种全新的异步编程模 ...
- 【剑指offer】链表第一个公共子结点
*思路: 先求得两个链表的长度,然后得到长度差diff,再先遍历长链表diff步后,再同时遍历两个链表并比较对象指针. /* public class ListNode { int val; List ...