Upgrading SQLite3 version used in python3 on linux?

admin

Administrator
Staff member
I need to upgrade the sqlite3 version that my python 3 uses but there seems to be no clear answers and I don't understand what determines the version of sqlite3 used by python. I am running CentOS7 with python 3.6.4 installed. CentOS had sqlite version 3.7.17 installed and I upgraded this to 3.23.1 thinking python would also use this never version of sqlite.

Code:
import sqlite3
print(sqlite3.sqlite_version)

The following code still gives me 3.17. I have googled how to upgrade the version but most <a href="https://stackoverflow.com/questions/29282380/python-sqlite3-run-different-sqlite3-version">solutions</a> seem to refer to pysqlite which is python 2 only. Other solutions talk about <a href="https://nelsonslog.wordpress.com/2016/03/18/upgrading-sqlite3-within-python-3/" rel="noreferrer">complicated compiling processes</a> that go way over my head.

I don't understand what determines the sqlite version that python uses. Is it determined by the python version, OS installed sqlite version? I am also running python 3.6.4 on my windows PC and it says I am running 3.14.2 so it seems that the sqlite version does not depend on the python version.

What determines the sqlite version python uses? Is there not a more straight forward way to upgrade the sqlite version for python 3?