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
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 ***