Python 2.7.3 on Mac OS X Snow Leopard (downloaded from python.org), tells me it is using sqlite 3.6.12 (sqlite3.sqlite_version).
However, to use foreign keys, I need at least sqlite 3.6.19.
How can I update sqlite alone?
I already tried pip install pysqlite (from this question/answer: Updating the SQLite3 build on my python install), but the sqlite_version did not change. pip search sqlite shows pysqlite 2.6.3 is installed, but I still have, both from commands python and python2.7
>>> import sqlite3
>>> sqlite3.sqlite_version #3.6.12
>>> sqlite3.version #2.6.0 (yeah, no 2.6.3)
You’ll first need to install SQLite, then build and install
pysqlite, making sure that it’s building against your newly installed version of sqlite and not the system’s version of sqlite. Alternately, if pysqlite is dynamically linked, you might be able to fiddle withLD_LIBRARY_PATHto make your existing pysqlite load the newer version of the library.For more, see: https://groups.google.com/group/python-sqlite/browse_thread/thread/9fb6694c803431eb