title: How can I use the FTS5 extension with the sqlite3 python module with Python 3.7?
body: <p>How can I use the <code>FTS5</code> extension with the <code>sqlite3</code> python module with Python 3.7?</p>
  
  <p>I tried to run the following code in Python with <code>python testFTS5.py</code>:</p>
  
  <pre><code>import sqlite3
  conn = sqlite.connect('some_db.db')
  sqlite.enable_load_extension(True)
  sqlite.load_extension('fts5') 
  </code></pre>
  
  <p>which results in the error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./src/test.py", line 3, in &lt;module&gt;
      sqlite.enable_load_extension(True)
  AttributeError: module 'sqlite3' has no attribute 'enable_load_extension'
  </code></pre>
  
  <p>I tried <code>sqlite.load_extension('FTS5')</code> and <code>sqlite.load_extension('ENABLE_FTS5')</code> but it unsurprisingly yields the same error message (with the corresponding filename being not found). I also tried running the code with <code>LD_LIBRARY_PATH=/usr/local/bin python testFTS5.py</code> but I get the same error message. </p>
  
  <p>I checked the <code>sqlite3</code> location by running the following code in the terminal:</p>
  
  <pre><code>derno@ompn:/mnt/ilcompn0d1/user/dernonco/fts-test$ which sqlite3
  /usr/local/bin/sqlite3
  </code></pre>
  
  <p>and I listed the installed <code>sqlite3</code> extensions:</p>
  
  <pre><code>derno@ompn:/mnt/ilcompn0d1/user/dernonco/fts-test$ sqlite3
  SQLite version 3.18.0 2017-03-28 18:48:43
  Enter ".help" for usage hints.
  Connected to a transient in-memory database.
  Use ".open FILENAME" to reopen on a persistent database.
  sqlite&gt; pragma compile_options;
  COMPILER=gcc-5.4.0 20160609
  DEFAULT_SYNCHRONOUS=2
  DEFAULT_WAL_SYNCHRONOUS=2
  ENABLE_FTS5
  ENABLE_RTREE
  SYSTEM_MALLOC
  THREADSAFE=1
  </code></pre>
  
  <p>which seems to indicate that the FTS5 is available in my <code>/usr/local/bin/sqlite3</code> version.</p>
  
  <p>However when I run</p>
  
  <pre><code>import sqlite3
  
  con = sqlite3.connect(':memory:')
  cur = con.cursor()
  cur.execute('pragma compile_options;')
  available_pragmas = cur.fetchall()
  con.close()
  
  print(available_pragmas)
  </code></pre>
  
  <p>it outputs:</p>
  
  <pre><code>[('COMPILER=gcc-5.4.0 20160609',), ('DEFAULT_SYNCHRONOUS=2',), ('DEFAULT_WAL_SYNCHRONOUS=2',), 
  ('ENABLE_FTS3',), ('ENABLE_RTREE',), ('SYSTEM_MALLOC',), ('THREADSAFE=1',)]
  </code></pre>
  
  <p>There is no <code>ENABLE_FTS5</code> in that list.</p>
  
  <p>I tried with Python 3.7.6 (default, Dec 19 2019, 23:49:42)  and  Python 3.6.7 (default, Oct 25 2018, 09:16:13).</p>