tensorflow / models

Models and examples built with TensorFlow
Other
76.97k stars 45.79k forks source link

Python 3.9 is not working with tensorflow_models #11247

Open DanielUsselmann opened 1 month ago

DanielUsselmann commented 1 month ago

Prerequisites

Please answer the following question for yourself before submitting an issue.

1. The entire URL of the documentation with the issue

https://github.com/tensorflow/models

2. Describe the issue

In the README part it says, that Python 3.9 is supported but if I try to use tensorflow_models I'm getting: TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

There has been a similar issue with https://github.com/tensorflow/models/issues/10986 but the docu still says it works with python 3.9

bharatjetti commented 4 days ago

Hi @DanielUsselmann Thanks for reporting the issue. I was able to reproduce this issue, it is due to new typing feature of python 3.10. I've opened a PR #11259 to make tensorflow_models compatible with python3.7+