【问题标题】:OperationalError: no such module: fts4 ? Also No Extensions Available in SQLite in PythonOperationalError:没有这样的模块:fts4? Python中的SQLite也没有可用的扩展
【发布时间】:2021-02-11 15:15:47
【问题描述】:

我正在尝试使用模糊匹配器,但是当我运行代码时出现以下错误:

OperationalError: no such module: fts4

另外,我尝试通过使用代码将最新的 sqlite.dll 文件放在 C:\ProgramData\Anaconda3\DLLs 中来加载扩展

import sqlite3
conn = sqlite3.connect(':memory:')
cur = conn.cursor()
conn.enable_load_extension(True)
for (val,) in cur.execute('pragma compile_options'): 
    print (val)

但没有显示扩展并返回以下代码,

COMPILER=msvc-1916
THREADSAFE=1

【问题讨论】:

    标签: python full-text-search operationalerror python-sql


    【解决方案1】:

    这些是我遵循的步骤和启用了扩展,

    1. Update the Sqlite by following on anaconda:
    conda install -c anaconda sqlite
    
    2.Download and Extract the following folder
    https://github.com/rogerbinns/apsw/releases/download/3.33.0-r1/apsw-3.33.0-r1.zip
    
    3. Run Anaconda & following command in that folder:
    python setup.py install test
    

    【讨论】:

      猜你喜欢
      • 2020-09-06
      • 1970-01-01
      • 2015-04-20
      • 2020-08-16
      • 1970-01-01
      • 2020-03-07
      • 1970-01-01
      • 1970-01-01
      • 2017-02-19
      相关资源
      最近更新 更多