ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

import tensorflow error

2021-09-25 20:03:22  阅读:627  来源: 互联网

标签:error py site File tensorflow import line


import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/root/anaconda3/envs/SCIIE/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/home/root/anaconda3/envs/SCIIE/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/home/root/anaconda3/envs/SCIIE/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/home/root/anaconda3/envs/SCIIE/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 113
    class DescriptorBase(metaclass=DescriptorMetaclass):
                                  ^
SyntaxError: invalid syntax

解决办法:pip install protobuf==3.17.3

标签:error,py,site,File,tensorflow,import,line
来源: https://blog.csdn.net/weixin_37961631/article/details/120476592

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有