import tensorflow error

created at 09-27-2021 views: 5

error

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

solution

pip install protobuf==3.17.3
created at:09-27-2021
edited at: 09-27-2021: