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

ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' #15

Open
realsbd opened this issue Jul 16, 2024 · 3 comments
Open

Comments

@realsbd
Copy link

realsbd commented Jul 16, 2024

When i run make migrate, i got this error

$ make migrate poetry run alembic upgrade head Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Scripts\alembic.exe\__main__.py", line 4, in <module> File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\alembic\__init__.py", line 1, in <module> from . import context File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\alembic\context.py", line 1, in <module> from .runtime.environment import EnvironmentContext File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\alembic\runtime\environment.py", line 19, in <module> from sqlalchemy.sql.schema import Column File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\sqlalchemy\__init__.py", line 12, in <module> from . import util as _util File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\sqlalchemy\util\__init__.py", line 15, in <module> from ._collections import coerce_generator_arg as coerce_generator_arg File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\sqlalchemy\util\_collections.py", line 39, in <module> from .typing import is_non_string_iterable File "C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\sqlalchemy\util\typing.py", line 56, in <module> from typing_extensions import TypeAliasType as TypeAliasType # 3.12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (C:\Users\DELL\AppData\Local\pypoetry\Cache\virtualenvs\bicxchange-PYV2jhZE-py3.11\Lib\site-packages\typing_extensions.py) make: *** [Makefile:55: migrate] Error 1

@daniilmastrangeli
Copy link

@realsbd check ur python version

@realsbd
Copy link
Author

realsbd commented Jul 17, 2024

@realsbd check ur python version

image
my python version in the docker is 3.10

@iam-abbas
Copy link
Owner

You need python 3.11.1

i recommend using a version manager like this: https://asdf-vm.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants