When using the latest django from PyPI in CentOS 7, running "./manage.py runserver" gives an error about sqlite being too old.
Since there's no newer sqlite version in the CentOS repos, I tried building sqlite from scratch:
This sets up the latest sqlite3 to /usr/local/bin/.
Since /usr/local/bin is ahead of /usr/bin in my PATH, just running "sqlite3" in the terminal runs the latest sqlite.
It runs without issues, and shows that it's the latest version:
my_hostname# sqlite3
SQLite version 3.29.0 2019-07-10 17:32:03
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>
Running "./manage.py runserver" again, it still tries to use the old version in /usr/bin, and fails.
My django is running in a pipenv virtual environment, where PATH still has /usr/local/bin/ ahead of /usr/bin, and running "sqlite3" in terminal still shows the latest version.
I followed the traceback django gives me to the dbapi2.py module, where to figure out the sqlite version it does this:
import _sqlite3
_sqlite3.sqlite_version
If I run "python" in my virtualenv, and type those 2 lines, it shows the old version of sqlite too.
_sqlite3 is not written in python - it's a compiled binary, so I can't examine it to see where it looks.
Am I missing something?
How can I tell _sqlite3 that there's a newer version of sqlite available on the system?
Does _sqlite3 even care about /usr/local/bin/sqlite3? Or is there some sqlite library it's looking for?