tensorflow / tensorflow

An Open Source Machine Learning Framework for Everyone

Home Page:https://tensorflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protobuf does not support 4.x

LeeYunhang opened this issue · comments

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.16.1

Custom code

Yes

OS platform and distribution

No response

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

I encountered the following error when loading tensorflow with protobuf==4.25.3 installed

File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/init.py", line 45, in
from tensorflow._api.v2 import internal
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/_api/v2/internal/init.py", line 8, in
from tensorflow._api.v2.internal import autograph
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/_api/v2/internal/autograph/init.py", line 8, in
from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/autograph/core/ag_ctx.py", line 21, in
from tensorflow.python.autograph.utils import ag_logging
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/autograph/utils/init.py", line 17, in
from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/autograph/utils/context_managers.py", line 19, in
from tensorflow.python.framework import ops
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 50, in
from tensorflow.python.eager import context
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/eager/context.py", line 37, in
from tensorflow.python.eager import execute
File "/opt/python-3.10.11/lib/python3.10/site-packages/tensorflow/python/eager/execute.py", line 17, in
from google.protobuf import text_format
File "/opt/python-3.10.11/lib/python3.10/site-packages/google/protobuf/text_format.py", line 33, in
from google.protobuf import unknown_fields
File "/opt/python-3.10.11/lib/python3.10/site-packages/google/protobuf/unknown_fields.py", line 21, in
if api_implementation._c_module is not None: # pylint: disable=protected-access
AttributeError: module 'google.protobuf.internal.api_implementation' has no attribute '_c_module'

Standalone code to reproduce the issue

in ComfyUI

Relevant log output

No response

@SuryanarayanaY Hi, Do you know why protobuf 4.x hasn't been supported yet?

commented

Hi @LeeYunhang ,

Please find below the list of protobuf versions supported for nightly version.

'protobuf>=3.20.3,<5.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5'

@SuryanarayanaY Hi, Do you know why protobuf 4.x hasn't been supported yet?

I am not sure which versions are in pipeline now ? I need to check with concern developer team and will update.