Installation problem with protobuff and coffee

For the last 2 days I tried to install caffe on OSX 10.10

I managed to successfully run all the installation commands for caffe, but when I tried to import caffe into ipython, I got the same error: https://github.com/BVLC/caffe/issues/2092

So, as suggested in the thread, I tried to downgrade protobuffrom 3.0.0 to 2.6.1. I was able to install successfully protoc, and the new version says 2.6.1

But now I can not install the python library protobuf. I follow the instructions given here: https://github.com/google/protobuf/tree/v2.6.1/python When I run the command python setup.py google_test, the following error appears:

from google.protobuf import descriptor_pb2

File "/path/to/protobuf-2.6.1/python/google/protobuf/descriptor_pb2.py", line 21, in module>

80 \ x80 \ x80 \ x02 \ "} \ n \ x10 \ x45numValueOptions \ x12 \ x19 \ n \ ndeprecated \ x18 \ x01 \ X01 (\ x08: \ x05 \ x66 \ x61lse \ x12 \ x43 \ n \ x14uninterpreted_option \ x18 \ xe7 \ X07 \ X03 (\ x0b \ x32 $ .google.protobuf.UninterpretedOption * \ t \ x08 \ X E8 \ X07 \ x10 \ x80 \ x80 \ x80 \ x80 \ x02 \ "{\ n \ x0eServiceOptions \ x12 \ x19 \ n \ ndeprecated \ x18! \ X01 (\ x08: \ x05 \ x66 \ x61lse \ x12 \ x43 \ n \ x14uninterpreted_option \ x18 \ xe7 \ X07 \ X03 (\ x0b \ x32 $ .google.protobuf.UninterpretedOption * \ t \ x08 \ X E8 \ X07 \ x10 \ x80 \ x80 \ x80 \ x80 \ x02 \ "g \ n \ rMethodOptions \ x12 \ x19 \ n \ ndeprecated \ x18! \ X01 (\ x08: \ x05 \ x66 \ x61lse \ x12 \ x43 \ n \ x14uninterpreted_option \ x18 \ xe7 \ X07 \ X03 (\ x0b \ x32 $ .google.protobuf.UninterpretedOption * \ t \ x08 \ X E8 \ 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 \ 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_comments \ x18 \ x03 \ X01 (\ t \ x12 \ x19 \ n \ x11trailing_comments \ x18 \ x04 \ X01 (\ Tb) \ n \ x13 \ x63om.google.protobufB \ x10 \ x44 \ x65scriptorProtosH \ x01 ')))))))))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_comments \ x18 \ x03 \ X01 (\ t \ x12 \ x19 \ n \ x11trailing_comments \ x18 \ x04 \ X01 (\ Tb) \ n \ x13 \ x63om.google.protobufB \ x10 \ x44 \ x65scriptorProtosH \ x01 ')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_comments \ x18 \ x03 \ X01 (\ t \ x12 \ x19 \ n \ x11trailing_comments \ x18 \ x04 \ X01 (\ Tb) \ n \ x13 \ x63om.google.protobufB \ x10 \ x44 \ x65scriptorProtosH \ x01 ')

TypeError: init() 'syntax'

Google . , .

+4
1

brew, , protobuf 2.6.0 :

# First, uninstall protobuf
# Then let 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.

0

All Articles