python sqlite3 with fts4
Hi all,
The sqlite3 that's come bundled with python in slackware-current doesn't have fts, I get "no such module: fts4" when trying to run a script that needs it. I don't know much about python, so I'm not sure how to tackle this. Do I need to recompile the python package? or just the bundled sqlite somehow? Just to be clear, the "system" sqlite3 does have fts compiled in, but python uses it's own version of sqlite3. Any help appreciated, Niv |
Quote:
Code:
$ ldd /usr/lib64/python2.7/lib-dynload/_sqlite3.so | grep sqlite Code:
$ python -c 'import sqlite3; print sqlite3.sqlite_version' Code:
sqlite> pragma compile_options; Code:
>>> import sqlite3 |
I think I found the fix:
Quote:
Code:
sed -i '/SQLITE_OMIT_LOAD_EXTENSION/d' setup.py |
Thanks audriusk, these compile_options got me thinking it's a different sqlite lib.
I tried your suggestion, but it doesn't work Code:
>>> import sqlite3 why python can't use this feature is a mystery. |
You don't need to load FTS extensions manually, just rebuild python package after applying the following patch:
Code:
--- python.SlackBuild.orig 2016-09-07 02:20:52.000000000 +0300 |
Huh, strange, that's what I did.
I'll try again, maybe I missed something. Thanks |
You didn't do anything wrong, it's just that you need FTS4 not FTS3.
FTS4 is currently not built for sqlite because of a bug in sqlite's configure script. You'd need to add this to sqlite.SlackBuild before ./configure is called: Quote:
I'd expect fixes for both of these issues to make it into -current soon though. |
Thanks ppr:kut! It works!
|
Glad to hear it :)
|
All times are GMT -5. The time now is 02:28 PM. |