過去2日間から、OSX10.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からインポートdescriptor_pb2
ファイル "/path/to/protobuf-2.6.1/python/google/protobuf/descriptor_pb2.py"、 21行目、モジュール内>
80x80x80x02 "} nx10x45numValueOptionsx12x19nndeprecatedx18x01 x01(x08:x05x66x61lsex12x43nx14uninterpreted_optionx18xe7x07 x03(x0bx32 $ .google.protobuf.UninterpretedOption * tx08xe8x07x10x80x80x80x80x02 "{nx0eServiceOptionsx12x19nndeprecatedx18! x01(x08:x05x66x61lsex12x43nx14uninterpreted_optionx18xe7x07 x03(x0bx32 $ .google.protobuf.UninterpretedOption * tx08xe8x07x10x80x80x80x80x02 "znrMethodOptionsx12x19nndeprecatedx18! x01(x08:x05x66x61lsex12x43nx14uninterpreted_optionx18xe7x07 x03(x0bx32 $ .google.protobuf.UninterpretedOption * tx08xe8x07x10x80x80x80x80x02 "x9ex02nx13UninterpretedOptionx12; nx04namex18x02 x03(x0bx32-.google.protobuf.UninterpretedOption.NamePartx12x18nx10identifier_valuex18x03 x01(tx12x1anx12positive_int_valuex18x04 x01(x04x12x1anx12negative_int_valuex18x05 x01(x03x12x14nx0cx64ouble_valuex18x06 x01(x01x12x14nx0cstring_valuex18x07 x01(x0cx12x17nx0fx61ggregate_valuex18x08 x01(tx1ax33nx08NamePartx12x11ntname_partx18x01 x02(tx12x14nx0cis_extensionx18x02 x02(x08 "xb1x01nx0eSourceCodeInfox12:nx08locationx18x01 x03(x0bx32(.google.protobuf.SourceCodeInfo.Locationx1ax63nx08Locationx12x10nx04pathx18x01 x03(x05x42x02x10x01x12x10nx04spanx18x02 x03(x05x42x02x10x01x12x18nx10leading_commentsx18x03 x01(tx12x19nx11trailing_commentsx18x04 x01(tB)nx13x63om.google.protobufBx10x44x65scriptorProtosHx01 ")
TypeError: その中に()予期しないキーワード引数「構文」を取得しました
グーグルにはあまりありません。助けてください。
回答:
回答№1は0私は使用しています 醸造 そして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.1はまだbrewで利用できないようであるため、ここでは2.6.0を使用しました。