How to update python-sqlite on mac osx

Python 2.7.3 on Mac OS X Snow Leopard (downloaded from python.org) tells me that it uses sqlite 3.6.12 ( sqlite3.sqlite_version ). However, to use foreign keys I need at least sqlite 3.6.19.

How to update sqlite yourself?

I already tried pip install pysqlite (from this question / answer: Updating the SQLite3 assembly on my python installation ), but sqlite_version has not changed. pip search sqlite shows that pysqlite 2.6.3 is installed, but I still have both python and python2.7 commands

 >>> import sqlite3 >>> sqlite3.sqlite_version #3.6.12 >>> sqlite3.version #2.6.0 (yeah, no 2.6.3) 
+3
source share
1 answer

You need to install SQLite first , and then create and install pysqlite to make sure it is created against the recently installed version of sqlite, not the system version of sqlite. Alternatively, if pysqlite is dynamically linked, you can play with LD_LIBRARY_PATH so that your existing pysqlite downloads a newer version of the library.

See https://groups.google.com/group/python-sqlite/browse_thread/thread/9fb6694c803431eb for details

0
source

Source: https://habr.com/ru/post/1204598/


All Articles