By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Jun 27 '08 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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

Jun 27 '08 #2

P: n/a
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
Jun 27 '08 #3

P: n/a
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
Jun 27 '08 #4

P: n/a
Dennis Lee Bieber schrieb:
On Mon, 21 Apr 2008 19:05:46 -0400, py****@bdurham.com declaimed the
following in comp.lang.python:
>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
Jun 27 '08 #5

P: n/a
py****@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
Jun 27 '08 #6

P: n/a
Hi,

Diez B. Roggisch wrote:
Dennis Lee Bieber schrieb:
>On Mon, 21 Apr 2008 19:05:46 -0400, py****@bdurham.com declaimed the
following in comp.lang.python:
>>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
Jun 27 '08 #7

P: n/a
Paul Melis schrieb:
Hi,

Diez B. Roggisch wrote:
>Dennis Lee Bieber schrieb:
>>On Mon, 21 Apr 2008 19:05:46 -0400, py****@bdurham.com declaimed the
following in comp.lang.python:

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:

http://svn.python.org/view/external/...ource-3.5.7.x/

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
Jun 27 '08 #8

P: n/a
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.
Jun 27 '08 #9

P: n/a
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, *p*****@bdurham.com <mailto:py****@bdurham.com>*
<py****@bdurham.com <mailto:py****@bdurham.com>wrote:

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
Jun 27 '08 #10

This discussion thread is closed

Replies have been disabled for this discussion.