gpt4 book ai didi

python - 导入错误 : cannot import name '_ColumnEntity' Ubuntu20. 10

转载 作者:行者123 更新时间:2023-12-03 15:34:12 36 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query'

(4 个回答)


7 个月前关闭。



pip install apache-superset
然后我写了
superset db upgrade
我收到以下错误
Traceback (most recent call last):
File "/home/cod7/superset-env/bin/superset", line 5, in <module>
from superset.cli import superset
File "/home/cod7/superset-env/lib/python3.8/site-packages/superset/__init__.py", line 21, in <module>
from superset.app import create_app
File "/home/cod7/superset-env/lib/python3.8/site-packages/superset/app.py", line 24, in <module>
from flask_appbuilder import expose, IndexView
File "/home/cod7/superset-env/lib/python3.8/site-packages/flask_appbuilder/__init__.py", line 5, in <module>
from .api import ModelRestApi # noqa: F401
File "/home/cod7/superset-env/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 21, in <module>
from .convert import Model2SchemaConverter
File "/home/cod7/superset-env/lib/python3.8/site-packages/flask_appbuilder/api/convert.py", line 4, in <module>
from flask_appbuilder.models.sqla.interface import SQLAInterface
File "/home/cod7/superset-env/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 16, in <module>
from sqlalchemy_utils.types.uuid import UUIDType
File "/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
from .aggregates import aggregated # noqa
File "/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
from .functions.orm import get_column_key
File "/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
from .database import ( # noqa
File "/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy_utils/functions/database.py", line 11, in <module>
from .orm import quote
File "/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in <module>
from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/cod7/superset-env/lib/python3.8/site-packages/sqlalchemy/orm/query.py)
请帮助我,我长期以来一直面临这个错误

最佳答案

您已经安装了 SQLAlchemy 1.4.0。 SQLAlchemy-utils 目前与 SQLAlchemy > 1.4.0 不兼容。解决方案是将 SQLAlchemy 降级到 1.3.23。

pip install SQLAlchemy==1.3.23
Temporarily require sqlalchemy <1.4.0 to make compatible with sqlalchemy-utils一些细节。

关于python - 导入错误 : cannot import name '_ColumnEntity' Ubuntu20. 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66650110/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com