Does Python 2.5 include or not include SQLite engine?

Diez B. Roggisch deets at
Tue Apr 22 17:37:59 CEST 2008

Paul Melis schrieb:
> Hi,
> Diez B. Roggisch wrote:
>> Dennis Lee Bieber schrieb:
>>> On Mon, 21 Apr 2008 19:05:46 -0400, python at 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 at absinth:~$ find /usr/lib/python2.5/ | grep -i sqlite
>> /usr/lib/python2.5/lib-dynload/
>> /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/
>> /usr/lib/python2.5/site-packages/pysqlite2/__init__.pyc
>> /usr/lib/python2.5/site-packages/pysqlite2/
>> /usr/lib/python2.5/site-packages/pysqlite2/
>> /usr/lib/python2.5/site-packages/pysqlite2/dbapi2.pyc
>> /usr/lib/python2.5/sqlite3
>> /usr/lib/python2.5/sqlite3/
>> ...
>> 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 is only a wrapper around the real sqlite library.
> Compiling a fresh Python 2.5.2 install here gives:
> 15:46|paul at tabu:~/py25/lib/python2.5/lib-dynload> ldd
> =>  (0x00748000)
> => /usr/lib/ (0x00111000)
> => /lib/ (0x00631000)
> => /lib/ (0x00d1b000)
>         /lib/ (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.


More information about the Python-list mailing list