/ / Problema de instalação com protobuf e caffe - protocol-buffers, caffe

Problema de instalação com protobuf e caffe - buffers de protocolo, caffe

Nos últimos 2 dias, tenho tentado instalar o caffe no OSX 10.10

Consegui executar todos os comandos de instalação com êxito para o caffe, mas quando tentei importar o caffe no ipython, recebi exatamente o mesmo erro: https://github.com/BVLC/caffe/issues/2092

Então, como sugerido no tópico, tentei fazer o downgrade protobuf de 3.0.0 a 2.6.1. Consegui instalar com sucesso protoc e a nova versão diz 2.6.1

Mas agora não consigo instalar protobuf biblioteca python. Estou seguindo as instruções mencionadas aqui: https://github.com/google/protobuf/tree/v2.6.1/python Recebo o seguinte erro ao executar o comando python setup.py google_test:

de google.protobuf import descriptor_pb2

Arquivo "/path/to/protobuf-2.6.1/python/google/protobuf/descriptor_pb2.py", linha 21, no módulo>

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: nisso() obteve um argumento de palavra-chave inesperado "sintaxe"

Não há muito no Google. Por favor, ajude.

Respostas:

0 para resposta № 1

Estou a usar fermentar e pip e as coisas funcionarem bem, tente uma nova instalação do protobuf 2.6.0 da seguinte maneira:

# 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

Usei o 2.6.0 aqui porque o 2.6.1 parece ainda não estar disponível no brew.