question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python 3.8 - Sqlite3 version error

See original GitHub issue

python 3.8 centos 7 Docker image

Can’t update sqlite3. Tried Airflow 2.0.1 and 2.0.0. Same issue on Python 3.6 with Airflow 2.0.0. I was able to force the install on 2.0.0 but when running a task it failed because of the sqlite3 version mismatch.

Am I just stupid? #13496

#``` (app-root) airflow db init Traceback (most recent call last): File “/opt/app-root/bin/airflow”, line 5, in <module> from airflow.main import main File “/opt/app-root/lib64/python3.8/site-packages/airflow/init.py”, line 34, in <module> from airflow import settings File “/opt/app-root/lib64/python3.8/site-packages/airflow/settings.py”, line 37, in <module> from airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf # NOQA F401 File “/opt/app-root/lib64/python3.8/site-packages/airflow/configuration.py”, line 1007, in <module> conf.validate() File “/opt/app-root/lib64/python3.8/site-packages/airflow/configuration.py”, line 209, in validate self._validate_config_dependencies() File “/opt/app-root/lib64/python3.8/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 (app-root) python -c “import sqlite3; print(sqlite3.sqlite_version)” 3.7.17 (app-root) python --version Python 3.8.6 (app-root) pip install --upgrade sqlite3 ERROR: Could not find a version that satisfies the requirement sqlite3 (from versions: none) ERROR: No matching distribution found for sqlite3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
pgibertcommented, Feb 18, 2021

Hello close to your problem i think … … i got the same error with python 3.8 centos 7 but on a manual installation ( no docker) resolved with the following steps :

  1. wget https://www.sqlite.org/2021/sqlite-autoconf-3340100.tar.gz
  2. tar xvf sqlite-autoconf-3340100.tar.gz
  3. cd sqlite-autoconf-3340100
  4. ./configure
  5. make
  6. sudo make install
  7. ls /usr/local/lib
  8. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  9. airfow info

Apache Airflow: 2.0.1 System info … … etc --> ok

1reaction
subashcanapathycommented, Feb 21, 2021

I used the following on amazonlinux2 to get latest sqlite

    # Pre-req
    yum -y install wget tar gzip gcc make expect

    wget https://www.sqlite.org/src/tarball/sqlite.tar.gz
    tar xzf sqlite.tar.gz
    cd sqlite/
    export CFLAGS="-DSQLITE_ENABLE_FTS3 \
        -DSQLITE_ENABLE_FTS3_PARENTHESIS \
        -DSQLITE_ENABLE_FTS4 \
        -DSQLITE_ENABLE_FTS5 \
        -DSQLITE_ENABLE_JSON1 \
        -DSQLITE_ENABLE_LOAD_EXTENSION \
        -DSQLITE_ENABLE_RTREE \
        -DSQLITE_ENABLE_STAT4 \
        -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
        -DSQLITE_SOUNDEX \
        -DSQLITE_TEMP_STORE=3 \
        -DSQLITE_USE_URI \
        -O2 \
        -fPIC"
    export PREFIX="/usr/local"
    LIBS="-lm" ./configure --disable-tcl --enable-shared --enable-tempstore=always --prefix="$PREFIX"
    make
    make install
Read more comments on GitHub >

github_iconTop Results From Across the Web

django can't find new sqlite version? (SQLite 3.8.3 or later is ...
I've cloned a django project to a Centos 7 vps and I'm trying to run it now, but I get this error when...
Read more >
how to force python to use recent sqlite3 version - SQLite Forum
Is there a way to force python to use the recent way of sqlite3? $ python -c "import sqlite3; print(sqlite3.sqlite_version)" 3.22.0.
Read more >
How to use the new SQLite STRICT keyword with Python 3?
However, the SQLite3 module bundled with Python 3.7.9 cannot work with it (sqlite3.DatabaseError: malformed database schema (tableName) - near “ ...
Read more >
SQLite 3.8.3 or later is required (found 3.7.17). - Google Groups
Error is simple. Python is using too old version of sqlite. There are few options to fix that depending what os your system...
Read more >
[GitHub] [airflow] pgibert commented on issue #14208
... commented on issue #14208: Python 3.8 - Sqlite3 version error ... to your problem i think ... .. i got the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found