Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project requires an old version of Protobuf #2328

Open
wingdagger opened this issue Apr 24, 2024 · 4 comments
Open

Project requires an old version of Protobuf #2328

wingdagger opened this issue Apr 24, 2024 · 4 comments
Labels
pending on user response Waiting for more information or validation from user

Comments

@wingdagger
Copy link

The following setup.py file requires version ~=3.20 of protobuf. This is a very old release. Protobuf is currently on version 5.26.1. This constraint of ~=3.20 is causing conflicts when I generate my python dependencies. Can you please allow for newer versions of protobuf? Thank you.

https://github.com/onnx/tensorflow-onnx/blob/ed022438576ca7a351c3858105439f4f25c35219/setup.py#L85C95-L85C111

@fatcat-z
Copy link
Collaborator

Thanks for your comments..

At this moment, tf2onnx is still designed to support older TensorFlow versions as many as possible and some of them could not work on a version above 3.20.x. In addition, couple of dependencies of tf2onnx also required the protobuf version ~= 3.20.0, so we can't upgrade its version in setup.py now.

@fatcat-z fatcat-z added the pending on user response Waiting for more information or validation from user label Apr 26, 2024
@wingdagger
Copy link
Author

Thank you for the fast response. Shouldn't tensorflow indicate the prereq version of protobuf that it requires. tf2onnx should not need to specify versions required by another project, right?

@yan12125
Copy link
Contributor

Shouldn't tensorflow indicate the prereq version of protobuf that it requires.

Apparently only tensorflow > 2.10 does that. That's probably why many tests fail with older tensorflow versions in #2327.

@yan12125
Copy link
Contributor

Here is an idea: Python 3.11 is supported since tensorflow 2.12. I think it's safe to say on Python >= 3.11, tensorflow already properly specifies compatible protobuf versions. How about something like this?

install_requires=[
    # (other dependencies)
    'protobuf~=3.20; python_version < "3.11"',
    'protobuf; python_version >= "3.11"',
]

In addition, couple of dependencies of tf2onnx also required the protobuf version ~= 3.20.0

I didn't check other dependencies. Such a trick may apply as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending on user response Waiting for more information or validation from user
Projects
None yet
Development

No branches or pull requests

3 participants