Hi I am new to airflow and try to install it. And I can install airflow successfully but when I do an airflow initdb
, the error is :
(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
Where should I install the packages?
Thanks!!
What version of airflow are you using?
I just ran into this issue using apache-airflow 1.10.14.
This issue was linked to the recent release of SQLAlchemy (1.4.2) or Flask-SQLAlchemy (2.5.1)
Reverting those dependencies to the previous version fixed it for me:
pip install SQLAlchemy==1.3.23
pip install Flask-SQLAlchemy==2.4.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With