【发布时间】:2016-07-27 14:58:51
【问题描述】:
我想使用 ethereon 的精彩包 caffe-tensorflow,但遇到了相同的问题 this closed issue:
当我运行示例或尝试 import caffepb 时,我收到了错误消息:
>>> import caffepb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "caffepb.py", line 28, in <module>
type=None),
File "/home/me/anaconda/python2.7/site-packages/google/protobuf/descriptor.py", line 652, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.
我在 linux 64 位 UBUNTU 14.04 机器上使用 Tensorflow 0.7.0,带有 protobuf 3.0.0b2.post(但它也发生在 3.0.0a4 和 3.0.0b2 上)和 Python 2.7 和 anaconda。
我多次尝试重新安装 protobuf 和 tensorflow,因为我认为这很可能是不同 protobuf 安装之间的冲突(或者至少这是 github 问题的结论),但即使在做了一个之后我也无法让它工作pip install protobuf、pip uninstall protobuf 或直接安装 protobuf .whl 的组合。
你有什么建议?
编辑:使用虚拟环境可能是一种解决方案,但我想尽可能避免使用它
【问题讨论】:
标签: python-2.7 tensorflow caffe protocol-buffers