协议缓冲区- protobuf和caffe的安装问题



从过去的两天里,我一直在尝试在OSX 10.10上安装caffe

我能够成功运行caffe的所有安装命令,但当我试图在ippython中导入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时,我得到以下错误:

从谷歌

。Protobuf import description

文件"/道路//protobuf-2.6.1/python/谷歌/protobuf/descriptor_pb2.py",第21行,module>

80 x80 x80 x02 "} n x10 x45numValueOptions x12 x19 n ndeprecated x18 x01( x01 (: x05 x66 x61lse x12 x43 n x14uninterpreted_option x18 xe7 x07 x03 ( x0b x32 .google.protobuf.UninterpretedOption美元* t ( xe8 x07 x10 x80 x80 x80 x80 x02 "{ n x0eServiceOptions x12 x19 n ndeprecated x18 !( x01 (: x05 x66 x61lse x12 x43 n x14uninterpreted_option x18 xe7 x07 x03 ( x0b x32 .google.protobuf.UninterpretedOption美元* t ( xe8 x07 x10 x80 x80 x80 x80 x02 "z n rMethodOptions x12 x19 n ndeprecated x18 !( x01 (: x05 x66 x61lse x12 x43 n x14uninterpreted_option x18 xe7 x07 x03 ( x0b x32 .google.protobuf.UninterpretedOption美元* t ( xe8 x07 x10 x80 x80 x80 x80 x02 " x9e x02 n x13UninterpretedOption x12; n x04name x18 x02 x03 ( x0b x32 -.google.protobuf.UninterpretedOption.NamePart x12 x18 n x10identifier_value x18 x03 t x01 ( 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 ( t x01 ( x1a x33 n x08NamePart x12 x11 n tname_part x18 x01 t x02 ( x12 x14 n x0cis_extension x18 x02 x02((" 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 ( x10 x05 × x02 x01 x12 x10 n x04span x18 x02 x03 ( x10 x05 × x02 x01 x12 x18 n x10leading_comments x18 x03 t x01 ( x12 x19 n x11trailing_comments x18 x04 x01结核)( n * 13 x63om.google.protobufB x10 x44 x65scriptorProtosH x01")

TypeError: init()得到一个意外的关键字参数'syntax'

在谷歌上没有太多。请帮助。

我正在使用brew和pip,事情进展顺利,尝试重新安装protobuf 2.6.0,如下所示:

# First, uninstall protobuf
# Then let's install protobuf 2.6.0 for Mac
brew install homebrew/versions/protobuf260
# And install the corresponding python library version
pip install protobuf==2.6.0

我在这里使用2.6.0,因为2.6.1似乎还没有在brew上可用。

最新更新