1

Im trying to run the following code

import tensorflow as tf

print("Hello TensorFlow version", tf.__Version__)

It is firing the following error

Users/anaconda/envs/cnn/bin/python /Users/Downloads/rude-carnie/version.py Traceback (most recent call last): File "/Users/Downloads/rude-carnie/version.py", line 1, in import tensorflow as tf File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/init.py", line 24, in from tensorflow.python import * File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/init.py", line 52, in from tensorflow.core.framework.graph_pb2 import * File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/core/framework/graph_pb2.py", line 10, in from google.protobuf import descriptor_pb2 File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/google/protobuf/descriptor_pb2.py", line 735, in options=None, file=DESCRIPTOR), File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 501, in new return _message.default_pool.FindFieldByName(full_name) KeyError: "Couldn't find field google.protobuf.EnumDescriptorProto.EnumReservedRange.start"

how can I be able to sort this out?

3
  • What's your import google.protobuf; google.protobuf.__version__? And which version of TensorFlow did you try to install? Nov 21, 2017 at 22:14
  • im using 3.5.0 version of protobuf and 1.4 v of tensorflow
    – user3600801
    Nov 22, 2017 at 15:01
  • Seems like an Anaconda issue. Maybe try pip/virtualenv? Nov 22, 2017 at 17:46

1 Answer 1

0

Today I came across same problem. Uninstall all the protobuf on your machine (both from anaconda and pip)

pip uninstall protobuf
conda remove protobuf

install protobuf using pip:

pip install protobuf==3.5.0.post1

Source : https://github.com/tensorflow/tensorflow/issues/14689

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.