gpt4 book ai didi

protocol-buffers - protobuf 和 caffe 的安装问题

转载 作者:行者123 更新时间:2023-12-04 08:34:41 24 4
gpt4 key购买 nike

从过去 2 天开始,我一直在尝试在 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 时出现以下错误:

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\xe8\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\xe8\x07\x10\x80\x80\x80\x80\x02\"z\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\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 \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')

TypeError: init() got an unexpected keyword argument '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,因为 brew 似乎还没有 2.6.1。

关于protocol-buffers - protobuf 和 caffe 的安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31307181/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com