how to get full-text search of pysqlite3 work in python2.5.2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hawk

    #1

    how to get full-text search of pysqlite3 work in python2.5.2

    Hi,
    my environment is debian, python 2.5.2.
    when i call con.enable_load _extension(True ), the following message
    prompt out.
    debian:~# python2.5
    Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
    [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
    Type "help", "copyright" , "credits" or "license" for more information.
    >>import sqlite3
    >>con = sqlite3.connect (":memory:")
    >>con.enable_lo ad_extension(Tr ue)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'sqlite3.Connec tion' object has no attribute
    'enable_load_ex tension'

    Thanks
    Hawk
  • Guilherme Polo

    #2
    Re: how to get full-text search of pysqlite3 work in python2.5.2

    On 10/30/08, hawk <gaohawk@gmail. comwrote:
    Hi,
    my environment is debian, python 2.5.2.
    when i call con.enable_load _extension(True ), the following message
    prompt out.
    debian:~# python2.5
    Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
    [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
    Type "help", "copyright" , "credits" or "license" for more information.
    >>import sqlite3
    >>con = sqlite3.connect (":memory:")
    >>con.enable_lo ad_extension(Tr ue)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'sqlite3.Connec tion' object has no attribute
    'enable_load_ex tension'
    >
    enable_load_ext ension was added in pysqlite 2.5, but python 2.5.2
    includes an older version of pysqlite.

    --
    -- Guilherme H. Polo Goncalves

    Comment

    • hawk

      #3
      Re: how to get full-text search of pysqlite3 work in python2.5.2

      On Oct 30, 8:21 pm, "Guilherme Polo" <ggp...@gmail.c omwrote:
      On 10/30/08, hawk <gaoh...@gmail. comwrote:
      >
      >
      >
      Hi,
       my environment is debian, python 2.5.2.
       when i call con.enable_load _extension(True ), the following message
       prompt out.
       debian:~# python2.5
       Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
       [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
       Type "help", "copyright" , "credits" or "license" for more information.
       >>import sqlite3
       >>con = sqlite3.connect (":memory:")
       >>con.enable_lo ad_extension(Tr ue)
       Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
       AttributeError: 'sqlite3.Connec tion' object has no attribute
       'enable_load_ex tension'
      >
      enable_load_ext ension was added in pysqlite 2.5, but python 2.5.2
      includes an older version of pysqlite.
      >
       Thanks
       Hawk
      >>
      --
      -- Guilherme H. Polo Goncalves
      i have solved this problem by install from latest source package. but,
      another issue raised, when i called con.execute("se lect
      load_extension( './fts3.so')") and con.execute("CR EATE VIRTUAL TABLE
      posts using FTS3(title, body);"). the error message is,
      >>from pysqlite2 import dbapi2 as sqlite3
      >>con = sqlite3.connect (":memory:")
      >>con.enable_lo ad_extension(Tr ue)
      >>con.execute(" select load_extension( './fts3.so')")
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      pysqlite2.dbapi 2.OperationalEr ror: extension loading is disabled

      i checked whole file system for fts.so. but there is no fts3.so
      anymore. then i downloaded the full source code of latest sqlite, and
      compiled it. but also, no fts2.so exists under build folder. finally,
      i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
      CFLAGS="-DSQLITE_ENABLE_ FTS3=1" option. the whole command line is
      "CFLAGS="-DSQLITE_ENABLE_ FTS3=1" ./configure". unfortunately, the
      fts3.so cannot be found too.
      how can i get the fts2.so!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!

      Comment

      • hawk

        #4
        Re: how to get full-text search of pysqlite3 work in python2.5.2

        sorry, all fts2 is fts3.
        On Oct 30, 10:04 pm, hawk <gaoh...@gmail. comwrote:
        On Oct 30, 8:21 pm, "Guilherme Polo" <ggp...@gmail.c omwrote:
        >
        >
        >
        On 10/30/08, hawk <gaoh...@gmail. comwrote:
        >
        Hi,
         my environment is debian, python 2.5.2.
         when i call con.enable_load _extension(True ), the following message
         prompt out.
         debian:~# python2.5
         Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
         [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
         Type "help", "copyright" , "credits" or "license" for more information.
         >>import sqlite3
         >>con = sqlite3.connect (":memory:")
         >>con.enable_lo ad_extension(Tr ue)
         Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
         AttributeError: 'sqlite3.Connec tion' object has no attribute
         'enable_load_ex tension'
        >
        enable_load_ext ension was added in pysqlite 2.5, but python 2.5.2
        includes an older version of pysqlite.
        >
         Thanks
         Hawk
        >>
        --
        -- Guilherme H. Polo Goncalves
        >
        i have solved this problem by install from latest source package. but,
        another issue raised, when i called con.execute("se lect
        load_extension( './fts3.so')") and con.execute("CR EATE VIRTUAL TABLE
        posts using FTS3(title, body);"). the error message is,
        >
        >from pysqlite2 import dbapi2 as sqlite3
        >con = sqlite3.connect (":memory:")
        >con.enable_loa d_extension(Tru e)
        >con.execute("s elect load_extension( './fts3.so')")
        >
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        pysqlite2.dbapi 2.OperationalEr ror: extension loading is disabled
        >
        i checked whole file system for fts.so. but there is no fts3.so
        anymore. then i downloaded the full source code of latest sqlite, and
        compiled it. but also, no fts2.so exists under build folder. finally,
        i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
        CFLAGS="-DSQLITE_ENABLE_ FTS3=1" option. the whole command line is
        "CFLAGS="-DSQLITE_ENABLE_ FTS3=1" ./configure". unfortunately, the
        fts3.so cannot be found too.
        how can i get the fts2.so!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!

        Comment

        • Guilherme Polo

          #5
          Re: how to get full-text search of pysqlite3 work in python2.5.2

          On 10/30/08, hawk <gaohawk@gmail. comwrote:
          On Oct 30, 8:21 pm, "Guilherme Polo" <ggp...@gmail.c omwrote:
          >
          On 10/30/08, hawk <gaoh...@gmail. comwrote:
          >
          >
          >
          Hi,
          my environment is debian, python 2.5.2.
          when i call con.enable_load _extension(True ), the following message
          prompt out.
          debian:~# python2.5
          Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
          [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
          Type "help", "copyright" , "credits" or "license" for more information.
          >>import sqlite3
          >>con = sqlite3.connect (":memory:")
          >>con.enable_lo ad_extension(Tr ue)
          Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          AttributeError: 'sqlite3.Connec tion' object has no attribute
          'enable_load_ex tension'
          >
          >
          enable_load_ext ension was added in pysqlite 2.5, but python 2.5.2
          includes an older version of pysqlite.
          >
          >>
          --
          -- Guilherme H. Polo Goncalves
          >
          i have solved this problem by install from latest source package. but,
          another issue raised, when i called con.execute("se lect
          load_extension( './fts3.so')") and con.execute("CR EATE VIRTUAL TABLE
          posts using FTS3(title, body);"). the error message is,
          >
          >>from pysqlite2 import dbapi2 as sqlite3
          >
          >con = sqlite3.connect (":memory:")
          >>con.enable_lo ad_extension(Tr ue)
          >
          >con.execute("s elect load_extension( './fts3.so')")
          >
          Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          >
          pysqlite2.dbapi 2.OperationalEr ror: extension loading is disabled
          >
          i checked whole file system for fts.so. but there is no fts3.so
          anymore. then i downloaded the full source code of latest sqlite, and
          compiled it. but also, no fts2.so exists under build folder. finally,
          i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
          CFLAGS="-DSQLITE_ENABLE_ FTS3=1" option. the whole command line is
          "CFLAGS="-DSQLITE_ENABLE_ FTS3=1" ./configure". unfortunately, the
          fts3.so cannot be found too.
          If you already compiled sqlite with SQLITE_ENABLE_F TS3 then you don't
          need to load a fts3 extension, sqlite is already compiled with it.

          Just skip the enable_load_ext ension and start at con.execute("CR EATE
          VIRTUAL TABLE posts using FTS3(title, body);").
          how can i get the fts2.so!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!
          >
          --

          >

          --
          -- Guilherme H. Polo Goncalves

          Comment

          Working...