4

I have been working on peewee's example blog application using python's Flask framework. (See https://github.com/coleifer/peewee, inside examples>blog).

I have installed all the requirements but when I try to run the application I keep getting

no such module : FTS4

error.

Why do you think I get this error? Does this mean the standard Python3 sqlite3 module doesn't have FTS modules?

If so is there a way to enable (install) FTS3/FTS4 modules for Python 3.4?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

1 Answers1

3

You can open a sqlite shell and run pragma compile_options to see what your SQLite has. AFAIK this has nothing to do with Python3.

Here are mine:

sqlite> pragma compile_options;
ENABLE_COLUMN_METADATA
ENABLE_FTS3
ENABLE_RTREE
ENABLE_UNLOCK_NOTIFY
SECURE_DELETE
SYSTEM_MALLOC
THREADSAFE=1

You may need to recompile SQLite if you find you do not have the FTS extension. Also check out the docs:

http://sqlite.org/fts3.html

coleifer
  • 24,887
  • 6
  • 60
  • 75
  • Thanks for your answer. I downloaded sqlite3 shell.exe and checked the options. I have **FTS3 Enabled.** I just don't understand what the problem is. – Mehmet Ragıp Altuncu May 06 '15 at 10:57
  • The sqlite you run in the shell is not the same as the sqlite you find in Python; Python contains its own DLL, which, by default, doesn't include fts3 or fts4 on Windows, at least as of Python 2.7.11. – Sam Bayer Nov 29 '16 at 19:05
  • I don't think you're correct. Python dynamically-links against the SQLite library you have installed. – coleifer Feb 07 '18 at 19:51