【发布时间】:2015-09-27 05:17:11
【问题描述】:
从最近两天开始,我一直在尝试在 OSX 10.10 上安装 caffe
我能够为 caffe 成功运行所有安装命令,但是当我尝试在 ipython 中导入 caffe 时,我得到了完全相同的错误:https://github.com/BVLC/caffe/issues/2092
因此,按照帖子中的建议,我尝试将 protobuf 从 3.0.0 降级到 2.6.1。我成功地安装了protoc 并且新版本确实是2.6.1
但现在我无法安装protobuf python 库。我正在按照此处提到的说明进行操作:https://github.com/google/protobuf/tree/v2.6.1/python
运行命令python setup.py google_test时出现以下错误:
从 google.protobuf 导入描述符_pb2
文件“/path/to/protobuf-2.6.1/python/google/protobuf/descriptor_pb2.py”, 第 21 行,在模块中>
80\x80\x80\x02\"}\n\x10\x45numValueOptions\x12\x19\n\n已弃用\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"{\n\x0eServiceOptions\x12\x19\n\n已弃用\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"z\n\rMethodOptions\x12\x19\n\n已弃用\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x02\n\x13UninterpretedOption\x12;\n \x04名称\x18\x02 \x03(\x0b\x32-.google.protobuf.UninterpretedOption.NamePart\x12\x18\n\x10identifier_value\x18\x03 \x01(\t\x12\x1a\n\x12positive_int_value\x18\x04 \x01(\x04\x12\x1a\n\x12negative_int_value\x18\x05 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x06 \x01(\x01\x12\x14\n\x0cstring_value\x18\x07 \x01(\x0c\x12\x17\n\x0f\x61ggregate_value\x18\x08 \x01(\t\x1a\x33\n\x08NamePart\x12\x11\n\tname_part\x18\x01 \x02(\t\x12\x14\n\x0cis_extension\x18\x02 \x02(\x08\"\xb1\x01\n\x0eSourceCodeInfo\x12:\n\x08location\x18\x01 \x03(\x0b\x32(.google.protobuf.SourceCodeInfo.Location\x1a\x63\n\x08Location\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x10\n\x04span\x18\x02 \x03(\x05\x42\x02\x10\x01\x12\x18\n\x10leading_cmets\x18\x03 \x01(\t\x12\x19\n\x11trailing_cmets\x18\x04 \x01(\tB)\n\x13\x63om.google.protobufB\x10\x44\x65scriptorProtosH\x01')
TypeError: init() 得到了一个意外的关键字参数“语法”
Google 上的内容不多。请帮忙。
【问题讨论】: