Issue
I'm trying to run Apache Airflow using a container CentOS7. I am running using Python 3.6.9. I already install apache airflow using pip but when I try to setup the database using airflow initdb
I get the following error:
(app-root) sh-4.2$ airflow version
Traceback (most recent call last):
File "/opt/app-root/bin/airflow", line 5, in <module>
from airflow.__main__ import main
File "/opt/app-root/lib/python3.6/site-packages/airflow/__init__.py", line 34, in <module>
from airflow import settings
File "/opt/app-root/lib/python3.6/site-packages/airflow/settings.py", line 37, in <module>
from airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf # NOQA F401
File "/opt/app-root/lib/python3.6/site-packages/airflow/configuration.py", line 1007, in <module>
conf.validate()
File "/opt/app-root/lib/python3.6/site-packages/airflow/configuration.py", line 209, in validate
self._validate_config_dependencies()
File "/opt/app-root/lib/python3.6/site-packages/airflow/configuration.py", line 246, in _validate_config_dependencies
raise AirflowConfigException(f"error: cannot use sqlite version < {min_sqlite_version}")
airflow.exceptions.AirflowConfigException: error: cannot use sqlite version < 3.15.0
What Can I do to solve this problem?
Solution
You need to upgrade your sqlite version:
yum update
yum install sqlite
Example with docker run -it centos:latest
:
[root@d09e5ee37969 /]# sqlite3 --version
3.26.0 2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238alt1
Airflow >=2.0.0 only works with Sqlite 3.15.0+
Answered By - kaxil