SQLite Forum

SQLITE python 3 issue, please help
Login
I'm running into a huge issue regarding sqlite3 version in a Flask app in Mac terminal. If in my terminal I'm running sqlite3 --version, I see 3.32.3 (which is great!). However for Flask I'm using python 3.7.6, and inside my Flask code if I type ...

import sqlite3
print('VERSION........', sqlite3.sqlite_version)
It prints 3.24.0 (which is old). So internally python 3.7.6 is using an older sqlite3 version. I need to user at least 3.25.0 (which supports window functions).

I have tried several solutions of how to resolve this issue but none successfully. Also whatever solution you suggest needs to work for our QA environment as well which is running docker in

FROM python:3.7.6-buster
This is driving me crazy, really appreciate for your help!

PS one of the solutions I tried is to add

pysqlite3==0.4.3 in my requirements.txt file and pip install that.

However that didn't work either and I ran into Symbol not found: _sqlite3_enable_load_extension