Я пытаюсь импортировать тензор потока - мое ядро является средой анаконды. Когда я запускаю «import tenorflow» с помощью терминала Anaconda, он работает отлично, но как только я пытаюсь сделать то же самое в Atom, он выдает следующую ошибку:
---------------------------------------------------------------------------
DecodeError Traceback (most recent call last)
<ipython-input-4-d6579f534729> in <module>
----> 1 import tensorflow
~\Anaconda3\lib\site-packages\tensorflow\__init__.py in <module>
22
23 # pylint: disable=g-bad-import-order
---> 24 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
25
26 from tensorflow._api.v1 import app
~\Anaconda3\lib\site-packages\tensorflow\python\__init__.py in <module>
50
51 # Protocol buffers
---> 52 from tensorflow.core.framework.graph_pb2 import *
53 from tensorflow.core.framework.node_def_pb2 import *
54 from tensorflow.core.framework.summary_pb2 import *
~\Anaconda3\lib\site-packages\tensorflow\core\framework\graph_pb2.py in <module>
13
14
---> 15 from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
16 from tensorflow.core.framework import function_pb2 as tensorflow_dot_core_dot_framework_dot_function__pb2
17 from tensorflow.core.framework import versions_pb2 as tensorflow_dot_core_dot_framework_dot_versions__pb2
~\Anaconda3\lib\site-packages\tensorflow\core\framework\node_def_pb2.py in <module>
13
14
---> 15 from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
16
17
~\Anaconda3\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py in <module>
346 AttrEntry = _reflection.GeneratedProtocolMessageType('AttrEntry', (_message.Message,), dict(
347 DESCRIPTOR = _NAMEATTRLIST_ATTRENTRY,
--> 348 __module__ = 'tensorflow.core.framework.attr_value_pb2'
349 # @@protoc_insertion_point(class_scope:tensorflow.NameAttrList.AttrEntry)
350 ))
~\Anaconda3\lib\site-packages\google\protobuf\internal\python_message.py in __init__(cls, name, bases, dictionary)
181 cls._decoders_by_tag = {}
182 if (descriptor.has_options and
--> 183 descriptor.GetOptions().message_set_wire_format):
184 cls._decoders_by_tag[decoder.MESSAGE_SET_ITEM_TAG] = (
185 decoder.MessageSetItemDecoder(descriptor), None)
~\Anaconda3\lib\site-packages\google\protobuf\descriptor.py in GetOptions(self)
158 else:
159 self._options = _ParseOptions(options_class(),
--> 160 self._serialized_options)
161
162 return self._options
~\Anaconda3\lib\site-packages\google\protobuf\descriptor.py in _ParseOptions(message, string)
924 proto2 files. It must not be used outside proto2.
925 """
--> 926 message.ParseFromString(string)
927 return message
928
~\Anaconda3\lib\site-packages\google\protobuf\message.py in ParseFromString(self, serialized)
185 """
186 self.Clear()
--> 187 return self.MergeFromString(serialized)
188
189 def SerializeToString(self, **kwargs):
~\Anaconda3\lib\site-packages\google\protobuf\internal\python_message.py in MergeFromString(self, serialized)
1123 length = len(serialized)
1124 try:
-> 1125 if self._InternalParse(serialized, 0, length) != length:
1126 # The only reason _InternalParse would return early is if it
1127 # encountered an end-group tag.
~\Anaconda3\lib\site-packages\google\protobuf\internal\python_message.py in InternalParse(self, buffer, pos, end)
1175 old_pos = new_pos
1176 (data, new_pos) = decoder._DecodeUnknownField(
-> 1177 buffer, new_pos, wire_type) # pylint: disable=protected-access
1178 if new_pos == -1:
1179 return pos
~\Anaconda3\lib\site-packages\google\protobuf\internal\decoder.py in _DecodeUnknownField(buffer, pos, wire_type)
950 return (0, -1)
951 else:
--> 952 raise _DecodeError('Wrong wire type in tag.')
953
954 return (data, pos)
DecodeError: Wrong wire type in tag.
Дайте мне знать, если у вас есть идеи, как это исправить!
Использование windows 10, python 3,7, анаконды и водорода. Перезагрузка компьютера и переустановка tenorflow / protobuf не помогли.
Спасибо!