我试图在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
>>>
答案 0 :(得分:0)
正如sygi所说:pip install protobuf
。
(否则,这个问题需要更多回答一年前在评论中提出的问题。)