美文网首页
ImportError: No module named pro

ImportError: No module named pro

作者: 无米的快乐生活 | 来源:发表于2017-11-16 14:23 被阅读0次

升级tensorflow后,出现报错信息:ImportError: No module named protobuf

>>> from tensorflow.examples.tutorials.mnist import input_data
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Chris/HappyCoding/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/Users/Chris/HappyCoding/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/Users/Chris/HappyCoding/tensorflow/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 protobuf

临时解决办法:卸载 tensorflow,重新安装

pip uninstall tensorflow
pip uninstall protobuf
pip uninstall google
pip install ~/Downloads/tensorflow-1.4.0-py2-none-any.whl 

相关文章

网友评论

      本文标题:ImportError: No module named pro

      本文链接:https://www.haomeiwen.com/subject/joplvxtx.html