ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/usr/local/lib/python3.7/site-packages/typing_extensions.py)のエラーがでてたけど python python

ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/usr/local/lib/python3.7/site-packages/typing_extensions.py)のエラーがでてたけど
pip install fastapi-sqlalchemy
をいれなおしたらでなくなった

pythonの version変えたのが影響してるのかな?

2024-01-31T04:11:54.458818989Z from sqlalchemy.orm.session import Session
2024-01-31T04:11:54.458822096Z File "/usr/local/lib/python3.7/site-packages/sqlalchemy/__init__.py", line 12, in <module>
2024-01-31T04:11:54.458825544Z from . import util as _util
2024-01-31T04:11:54.458828663Z File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/__init__.py", line 15, in <module>
2024-01-31T04:11:54.458843020Z from ._collections import coerce_generator_arg as coerce_generator_arg
2024-01-31T04:11:54.458846420Z File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/_collections.py", line 38, in <module>
2024-01-31T04:11:54.458849804Z from .typing import is_non_string_iterable
2024-01-31T04:11:54.458852961Z File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/typing.py", line 56, in <module>
2024-01-31T04:11:54.458856244Z from typing_extensions import TypeAliasType as TypeAliasType # 3.12
2024-01-31T04:11:54.458859492Z ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/usr/local/lib/python3.7/site-packages/typing_extensions.py)