You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running inside a virtual env and followed the given instructions. The following problem is consistent whether I compile from scratch or use the whl from the provided Internet link.
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
from tensorflow.python import *
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 13, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/mnt/4tb_internal/python/tensorflow/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in <module>
serialized_pb=_b('\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"d\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tb\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'syntax'
>>>
It's probably something to do with the path -- can you verify that there are no other protobuf libraries on your system that might be interfering? This problem only occurs when it's using the proto2 version of the python libraries: our python generated files use python3.
To help debug, maybe also try to print the version of the protobuf library when in python?
Activity
vrv commentedon Nov 10, 2015
Likely a dupe of #11 -- see the solutions near the very end to see if they help. Thanks!
liuyipei commentedon Nov 10, 2015
I removed libprotoc and followed instructions from https://github.com/google/protobuf and installed the new beta version of protoc 3.0.
Here is the output to
protoc --versionI then reinstalled tensorflow, but the output persists.
vrv commentedon Nov 10, 2015
It's probably something to do with the path -- can you verify that there are no other protobuf libraries on your system that might be interfering? This problem only occurs when it's using the proto2 version of the python libraries: our python generated files use python3.
To help debug, maybe also try to print the version of the protobuf library when in python?
or something like that?
liuyipei commentedon Nov 10, 2015
Thank you for your help.
google.protobuf.__version__was not defined, thereby confirming your suspicion about paths.To fix my issue:
I exited the tensorflow virtualenv and returned to my default env. Then, I did
sudo pip uninstall protobuf.Ref tensorflow#57: Moving to use class weight on logits before cross …
Fixes tensorflow#57: Adding class weight support on estimator level. …
[OpenCL] RandomGamma has no GPU friendly implementation (#57)
[OpenCL] RandomGamma has no GPU friendly implementation (#57)
[OpenCL] RandomGamma has no GPU friendly implementation (#57)
[OpenCL] Implementation improvements (#9117)
Spatial transformer: (tensorflow#57)
Fix bug in transformer model: Changed the examples to specify the out…
[OpenCL] Fixes SYCL stateless random ops (tensorflow#57)
Merge pull request tensorflow#57 from lissyx/ccpp-new
Update CMake files to reference appropriate directories, this should …