【问题标题】:trying to to import tflearn, but something is missing试图导入 tflearn,但缺少一些东西
【发布时间】:2016-12-17 20:44:51
【问题描述】:

我试图在 python shell 中导入 tflearn。

但是我收到一个错误

import tflearn

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import tflearn
  File "/usr/local/lib/python2.7/site-packages/tflearn/__init__.py", line 4, in <module>
    from . import config
  File "/usr/local/lib/python2.7/site-packages/tflearn/config.py", line 3, in <module>
    import tensorflow as tf
  File "/usr/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 63, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf
>>> 

【问题讨论】:

  • pip install protobuf?
  • 你运行的是什么版本的 tensorflow?你能正确导入tensorflow吗?

标签: python python-2.7 tensorflow tflearn


【解决方案1】:

正如 sygi 建议的那样:pip install protobuf

(否则这个问题需要对一年前在cmets提出的问题有更多的答案。)

【讨论】:

    猜你喜欢
    • 2015-09-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-04
    • 2013-10-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多