1

I am trying install TensorFlow on ubuntu 16.04, when I run python->import TensorFlow, I got error:

serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tB/\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01\xf8\x01\x01\x62\x06proto3') TypeError: init()got an unexpected keyword argument 'syntax'

I have googled this, some one said the problem is wrong version of protobuf, when I type "protobuf --version" which shows Missing output directives, this was showing 3.3.0 before I installed bazel, but when I have tried : " import google.protobuf " and "print google.protobuf.version " which shows: 3.5.2.post1 Can anyone tell me what is wrong !!!!

2 Answers 2

1

Try uninstalling protobuf and then check if Tensorflow works. If it still does not work try reinstalling Tensorflow. If it still does not work trying using virtual environment in python.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks for your reply, I have figured it out, the problem is protobuf has c++ and python, I only installed c++ but did not set up the python package, after I viewed offical document , and set up the python , tensorflow works fine !!!
Great that you went through the documentation once again and could solve your problem yourself.
0

Uninstall the protobuf and reinstall Tensorflow

You can use commands:

conda uninstall protobuf

Next

conda install tensorflow

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.