Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 817140 - sci-libs/tensorflow-2.5.0: Protobuf types mismatch, cannot create tf.Variable
Summary: sci-libs/tensorflow-2.5.0: Protobuf types mismatch, cannot create tf.Variable
Status: RESOLVED DUPLICATE of bug 806541
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-09 08:56 UTC by Stefan Huber
Modified: 2021-10-09 19:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2021-10-09 08:56:24 UTC
Instlaling sci-libs/tensorflow-2.5.0 with latest (and stable) dev-python/protobuf-python-3.17.3 leads to the following error when creating a tf.Variable (or a model):

>>> import tensorflow as tf
>>> x = tf.Variable(0.0)
[…]
line 177, in _variable_handle_from_shape_and_dtype
    cpp_shape_inference_pb2.CppShapeInferenceResult.HandleShapeAndType(
TypeError: Parameter to MergeFrom() must be instance of same class: expected tensorflow.TensorShapeProto got tensorflow.TensorShapeProto.

After upgrading to protobuf-3.18.1 with pip, the error disappears:

$ pip3 install --user --force protobuf
[…]
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorboard 2.5.0 requires google-auth<2,>=1.6.3, but you have google-auth 2.0.2 which is incompatible.
Successfully installed protobuf-3.18.1

>>> import tensorflow as tf
>>> x = tf.Variable(0.0)
>>> 


Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-09 19:53:26 UTC
I think this might be the same as bug 806541, but we should fix this.

*** This bug has been marked as a duplicate of bug 806541 ***