gpt4 book ai didi

package - 安装 Airflow - 导入错误 : No module named clsregistry

转载 作者:行者123 更新时间:2023-12-03 16:44:47 28 4
gpt4 key购买 nike

嗨,我是 Airflow 的新手并尝试安装它。我可以成功安装 Airflow ,但是当我做 airflow initdb 时,错误是:

(airflow_virtualenv) C02CF6JRMD6R:bin ybao$ airflow initdb

Traceback (most recent call last): File "/Users/ybao/airflow_virtualenv/bin/airflow", line 26, in <module>
from airflow.bin.cli import CLIFactory File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/bin/cli.py", line 82, in <module>
from airflow.www.app import (cached_app, create_app) File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/app.py", line 42, in <module>
from airflow.www.blueprints import routes File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/blueprints.py", line 25, in <module>
from airflow.www import utils as wwwutils File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/utils.py", line 40, in <module>
import flask_admin.contrib.sqla.filters as sqlafilters File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/__init__.py", line 2, in <module>
from .view import ModelView File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 18, in <module>
from flask_admin.contrib.sqla.tools import is_relationship File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/tools.py", line 4, in <module>
from sqlalchemy.ext.declarative.clsregistry import _class_resolver ImportError: No module named clsregistry
我应该在哪里安装软件包?
谢谢!!

最佳答案

您使用的是什么版本的 Airflow ?
我刚刚使用 apache-airflow 1.10.14 遇到了这个问题。
此问题与最近发布的 SQLAlchemy (1.4.2) 或 Flask-SQLAlchemy (2.5.1) 有关
将这些依赖项恢复到以前的版本为我修复了它:

pip install SQLAlchemy==1.3.23 
pip install Flask-SQLAlchemy==2.4.4

关于package - 安装 Airflow - 导入错误 : No module named clsregistry,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66774109/

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