Re: Does Python 2.5.2's embedded SQLite support full text searching?

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

    Re: Does Python 2.5.2's embedded SQLite support full text searching?

    On Apr 21, 2008, at 1:05 PM, Daniel Fetchinson wrote:
    Sqlite itself is not distributed with python. Only a python db api
    compliant wrapper is part of the python stdlib and as such it is
    completely independent of the sqlite build.
    Don't most binary distributions include SQLite itself? I installed
    2.5.2 on a new WinXP VM, and SQLite is working fine.

    -- Ed Leafe



  • Nemesis

    #2
    Re: Does Python 2.5.2's embedded SQLite support full text searching?

    Ed Leafe wrote:
    >Sqlite itself is not distributed with python. Only a python db api
    >compliant wrapper is part of the python stdlib and as such it is
    >completely independent of the sqlite build.
    >
    Don't most binary distributions include SQLite itself? I installed
    2.5.2 on a new WinXP VM, and SQLite is working fine.
    So did I. I installed py2.5.2 on windows and didn't install SQLite, and I'm
    using the module sqlitedb without problems.


    --
    Let us make a special effort to stop communicating with each other, so
    we can have some conversation.
    _ _ _
    | \| |___ _ __ ___ __(_)___
    | .` / -_) ' \/ -_|_-< (_-<
    |_|\_\___|_|_|_ \___/__/_/__/ http://xpn.altervista.org

    Comment

    • Daniel Fetchinson

      #3
      Re: Does Python 2.5.2's embedded SQLite support full text searching?

      Sqlite itself is not distributed with python. Only a python db api
      compliant wrapper is part of the python stdlib and as such it is
      completely independent of the sqlite build.
      Don't most binary distributions include SQLite itself? I installed
      2.5.2 on a new WinXP VM, and SQLite is working fine.
      >
      So did I. I installed py2.5.2 on windows and didn't install SQLite, and I'm
      using the module sqlitedb without problems.
      On linux this is not the case (i.e. on linux one has to install sqlite
      itself separately) and I assumed on windows you have to install sqlite
      separately too. My apologies for the misinformation.

      Cheers,
      Daniel

      Comment

      • python@bdurham.com

        #4
        Does Python 2.5 include or not include SQLite engine?

        While reading feedback to my post "Does Python 2.5.2's embedded SQLite
        support full text searching?" I noticed that there appears to be some
        confusion regarding whether Python 2.5 includes the SQLite engine.

        My Windows 2.5.2 binary download includes SQLite.

        But other posters claim otherwise, re: Linux releases of Python 2.5?

        I thought one of the major features of Python 2.5 was its embedded
        SQLite engine.

        Thoughts?

        Malcolm

        Comment

        • Diez B. Roggisch

          #5
          Re: Does Python 2.5 include or not include SQLite engine?

          Dennis Lee Bieber schrieb:
          On Mon, 21 Apr 2008 19:05:46 -0400, python@bdurham. com declaimed the
          following in comp.lang.pytho n:
          >
          >I thought one of the major features of Python 2.5 was its embedded
          >SQLite engine.
          >>
          No, just the inclusion of the adapter became standard... The
          packagers of Windows installers include the SQLite3 DLL as it isn't a
          commonly available item... But many Linux versions probably include it
          as an option during the OS install.
          AFAIK thats wrong. On my ubuntu gutsy for example, I find this:

          deets@absinth:~ $ find /usr/lib/python2.5/ | grep -i sqlite
          /usr/lib/python2.5/lib-dynload/_sqlite3.so
          /usr/lib/python2.5/site-packages/pysqlite-2.3.2.egg-info
          /usr/lib/python2.5/site-packages/pysqlite2
          /usr/lib/python2.5/site-packages/pysqlite2/__init__.py
          /usr/lib/python2.5/site-packages/pysqlite2/__init__.pyc
          /usr/lib/python2.5/site-packages/pysqlite2/_sqlite.so
          /usr/lib/python2.5/site-packages/pysqlite2/dbapi2.py
          /usr/lib/python2.5/site-packages/pysqlite2/dbapi2.pyc
          /usr/lib/python2.5/sqlite3
          /usr/lib/python2.5/sqlite3/__init__.py

          ....


          As you can see, stock 2.5 ships with its OWN version of sqlite, and I
          additionally installed the pysqlite-wrapper for whatever reason I now
          can't remember.

          Diez

          Comment

          • Diez B. Roggisch

            #6
            Re: Does Python 2.5 include or not include SQLite engine?

            python@bdurham. com schrieb:
            While reading feedback to my post "Does Python 2.5.2's embedded SQLite
            support full text searching?" I noticed that there appears to be some
            confusion regarding whether Python 2.5 includes the SQLite engine.
            >
            My Windows 2.5.2 binary download includes SQLite.
            >
            But other posters claim otherwise, re: Linux releases of Python 2.5?
            >
            I thought one of the major features of Python 2.5 was its embedded
            SQLite engine.
            >
            Thoughts?
            It is embedded. Period. You can install the pysqlite wrapper
            additionally, if you need a newer/differen sqlite version. It will be
            available as a different module, though.

            Diez

            Comment

            • Paul Melis

              #7
              Re: Does Python 2.5 include or not include SQLite engine?

              Hi,

              Diez B. Roggisch wrote:
              Dennis Lee Bieber schrieb:
              >
              >On Mon, 21 Apr 2008 19:05:46 -0400, python@bdurham. com declaimed the
              >following in comp.lang.pytho n:
              >>
              >>I thought one of the major features of Python 2.5 was its embedded
              >>SQLite engine.
              >>>
              > No, just the inclusion of the adapter became standard... The
              >packagers of Windows installers include the SQLite3 DLL as it isn't a
              >commonly available item... But many Linux versions probably include it
              >as an option during the OS install.
              >
              >
              AFAIK thats wrong. On my ubuntu gutsy for example, I find this:
              >
              deets@absinth:~ $ find /usr/lib/python2.5/ | grep -i sqlite
              /usr/lib/python2.5/lib-dynload/_sqlite3.so
              /usr/lib/python2.5/site-packages/pysqlite-2.3.2.egg-info
              /usr/lib/python2.5/site-packages/pysqlite2
              /usr/lib/python2.5/site-packages/pysqlite2/__init__.py
              /usr/lib/python2.5/site-packages/pysqlite2/__init__.pyc
              /usr/lib/python2.5/site-packages/pysqlite2/_sqlite.so
              /usr/lib/python2.5/site-packages/pysqlite2/dbapi2.py
              /usr/lib/python2.5/site-packages/pysqlite2/dbapi2.pyc
              /usr/lib/python2.5/sqlite3
              /usr/lib/python2.5/sqlite3/__init__.py
              >
              ...
              >
              >
              As you can see, stock 2.5 ships with its OWN version of sqlite, and I
              additionally installed the pysqlite-wrapper for whatever reason I now
              can't remember.
              The _sqlite3.so is only a wrapper around the real sqlite library.
              Compiling a fresh Python 2.5.2 install here gives:

              15:46|paul@tabu :~/py25/lib/python2.5/lib-dynloadldd _sqlite3.so
              linux-gate.so.1 = (0x00748000)
              libsqlite3.so.0 =/usr/lib/libsqlite3.so.0 (0x00111000)
              libpthread.so.0 =/lib/libpthread.so.0 (0x00631000)
              libc.so.6 =/lib/libc.so.6 (0x00d1b000)
              /lib/ld-linux.so.2 (0x00749000)

              I.e. the _sqlite3 module links against the system-wide installed Sqlite
              version.

              Furthermore, checking the Python source distribution will show that
              there is no included version of the whole Sqlite library, only the
              wrapper code. How your Linux distribution packages Python w.r.t. the
              sqlite3 module is different per distro.

              Regards,
              Paul

              Comment

              • Diez B. Roggisch

                #8
                Re: Does Python 2.5 include or not include SQLite engine?

                Paul Melis schrieb:
                Hi,
                >
                Diez B. Roggisch wrote:
                >Dennis Lee Bieber schrieb:
                >>
                >>On Mon, 21 Apr 2008 19:05:46 -0400, python@bdurham. com declaimed the
                >>following in comp.lang.pytho n:
                >>>
                >>>I thought one of the major features of Python 2.5 was its embedded
                >>>SQLite engine.
                >>>>
                >> No, just the inclusion of the adapter became standard... The
                >>packagers of Windows installers include the SQLite3 DLL as it isn't a
                >>commonly available item... But many Linux versions probably include it
                >>as an option during the OS install.
                >>
                >>
                >AFAIK thats wrong. On my ubuntu gutsy for example, I find this:
                >>
                >deets@absinth: ~$ find /usr/lib/python2.5/ | grep -i sqlite
                >/usr/lib/python2.5/lib-dynload/_sqlite3.so
                >/usr/lib/python2.5/site-packages/pysqlite-2.3.2.egg-info
                >/usr/lib/python2.5/site-packages/pysqlite2
                >/usr/lib/python2.5/site-packages/pysqlite2/__init__.py
                >/usr/lib/python2.5/site-packages/pysqlite2/__init__.pyc
                >/usr/lib/python2.5/site-packages/pysqlite2/_sqlite.so
                >/usr/lib/python2.5/site-packages/pysqlite2/dbapi2.py
                >/usr/lib/python2.5/site-packages/pysqlite2/dbapi2.pyc
                >/usr/lib/python2.5/sqlite3
                >/usr/lib/python2.5/sqlite3/__init__.py
                >>
                >...
                >>
                >>
                >As you can see, stock 2.5 ships with its OWN version of sqlite, and I
                >additionally installed the pysqlite-wrapper for whatever reason I now
                >can't remember.
                >
                The _sqlite3.so is only a wrapper around the real sqlite library.
                Compiling a fresh Python 2.5.2 install here gives:
                >
                15:46|paul@tabu :~/py25/lib/python2.5/lib-dynloadldd _sqlite3.so
                linux-gate.so.1 = (0x00748000)
                libsqlite3.so.0 =/usr/lib/libsqlite3.so.0 (0x00111000)
                libpthread.so.0 =/lib/libpthread.so.0 (0x00631000)
                libc.so.6 =/lib/libc.so.6 (0x00d1b000)
                /lib/ld-linux.so.2 (0x00749000)
                >
                I.e. the _sqlite3 module links against the system-wide installed Sqlite
                version.
                >
                Furthermore, checking the Python source distribution will show that
                there is no included version of the whole Sqlite library, only the
                wrapper code. How your Linux distribution packages Python w.r.t. the
                sqlite3 module is different per distro.
                Hm. Before posting, I checked this:



                So I got the impression that because the source is there (I admit *not*
                checking the python source distribution itself though) and a library is
                in the python-lib, that python ships with sqlite.

                So - I stand corrected. Given the way some linux distros treat python
                wrt to e.g. distutils, I wonder if there is one out there that does
                *not* have sqlite built-in.

                Diez

                Comment

                • Daniel Fetchinson

                  #9
                  Re: Does Python 2.5 include or not include SQLite engine?

                  While reading feedback to my post "Does Python 2.5.2's embedded SQLite
                  support full text searching?" I noticed that there appears to be some
                  confusion regarding whether Python 2.5 includes the SQLite engine.

                  My Windows 2.5.2 binary download includes SQLite.

                  But other posters claim otherwise, re: Linux releases of Python 2.5?

                  I thought one of the major features of Python 2.5 was its embedded
                  SQLite engine.

                  Thoughts?
                  >
                  It is embedded. Period.

                  Would you back that up, please? I mean with something else than "on my
                  distro I see something vaguely resembling an sqlite shared object".
                  The shared object lib-dynload/_sqlite3.so on most linux distros is
                  *not* sqlite only the wrapper.

                  This doesn't exclude the possibility of other python distros
                  distributing sqlite itself, for example on windows this seems to be
                  the case.

                  You can install the pysqlite wrapper
                  additionally, if you need a newer/differen sqlite version. It will be
                  available as a different module, though.

                  Comment

                  • Trent Mick

                    #10
                    Re: Does Python 2.5 include or not include SQLite engine?

                    Whether a Python installation includes the SQLite 3 bindings typically
                    depends on:

                    1. Python version: core support for the SQLite 3 bindings (i.e. the
                    "sqlite3" module) was added in Python 2.5. Earlier versions of Python
                    may also have a 3rd-party package/module that adds SQLite bindings, of
                    course.

                    2. The Python distro: The binary Python 2.5 installers from python.org
                    (for Windows and Mac OS X [^1]) and ActiveState, i.e. ActivePython, (for
                    Windows, Mac OS X, Linux, Solaris, HP-UX and AIX) include the "sqlite3"
                    module as part of the installer. I don't know about other Python
                    distributions.

                    3. Platform: Commonly on Linux one will get Python from the Linux
                    distro's own packaging utility (e.g., apt-get, rpm, synaptic, yum, etc.)
                    Typically the Linux distros will break up a Python installation into
                    multiple packages. So an installation of, say, the "python2.5" package
                    will often not have the "sqlite3" module. To get it you would have to
                    install the separate "python2.5-sqlite" package. (Note: the names of
                    these packages vary with Linux distro and version of that distro.)



                    Cheers,
                    Trent

                    [1]: I could be wrong about whether the Mac OS X binary installer for
                    Python 2.5 from python.org includes the "sqlite3" module -- I haven't
                    checked -- but I presume it does.


                    Banibrata Dutta wrote:
                    Doesn't this depend on the source / distro ? My Python is from the
                    ActivePython distro, while I am not sure (since I've just about started
                    playing with it), I haven't seen SQLite included ... possible that I
                    missed it.
                    >
                    On 4/22/08, *python@bdurham .com <mailto:python@ bdurham.com>*
                    <python@bdurham .com <mailto:python@ bdurham.com>wro te:
                    >
                    While reading feedback to my post "Does Python 2.5.2's embedded SQLite
                    support full text searching?" I noticed that there appears to be some
                    confusion regarding whether Python 2.5 includes the SQLite engine.
                    >
                    My Windows 2.5.2 binary download includes SQLite.
                    >
                    But other posters claim otherwise, re: Linux releases of Python 2.5?
                    >
                    I thought one of the major features of Python 2.5 was its embedded
                    SQLite engine.
                    >
                    Thoughts?

                    --
                    Trent Mick
                    trentm at activestate.com

                    Comment

                    Working...