[portland] Python-2.5.1 and SQLite3

jason kirtland jek at discorporate.us
Mon Nov 12 19:26:02 CET 2007


Rich Shepard wrote:
>    I'm stymied. Pysqlite support for SQLite3 is supposed to be built in to
> Python-2.5, and this does seem to be the case. But, when I try to run my
> application Python complains that it cannot find _sqlite3.so so the import
> (from sqlite3 import *) in the hierarchy fails.
> 
>    This library is supposed to be in /usr/lib/python2.5/lib-dynload/, but
> it's not. I see nothing on the Python web site about SQLite support, I've
> upgraded to pysqlite-2.3.5 (python2.5 apparently comes with -2.1.3), there
> are no specific option switches in the python2.5 ./configure file, and I
> have no responses to my request for help in the Slackware-12 forum.
> 
>    What's a person to do? I cannot find the source for this library so I can
> build and install it.
> 
> Help greatly appreciated,

It looks like the slackware package is broken.  You could try rebuilding 
Python from source and cherry-picking _sqlite3.so out of the built 
files.  It's built automatically as part of the extension module build 
process, although it will be quietly omitted if you don't have the 
sqlite headers installed or the compilation otherwise fails.

Using the newer pysqlite you've built instead of the distribution's 
broken sqlite3 is also an option.

-j



More information about the Portland mailing list