The simplest option if you just need a recent version of SQLite from python is now to install the pysqlite3 package (LINUX ONLY at the time of writing, per the project’s README file):
pip install pysqlite3-binary
This comes with a recent version of SQLite statically-linked. You can use it in a venv without affecting any other package.
You can use it like this:
from pysqlite3 import dbapi2 as sqlite3
print(sqlite3.sqlite_version)
If you happen to be using peewee
, it will pick it up automatically.
If you need a specific version of SQLite, you can build this package, as suggested in Aaron Digulla’s answer.