How to build the pysqlite? Where to find the "sqlite3.h"?
Thorsten Kampe
thorsten at thorstenkampe.de
Thu Nov 6 05:03:58 EST 2008
* Shawn Milochik (Wed, 5 Nov 2008 14:32:15 -0500)
> On Wed, Nov 5, 2008 at 1:55 PM, Thorsten Kampe
> > You (and Kurda) keep on talking the wrong stuff. First: you don't
> > need pysqlite2. SQLite support is included in the latest Python as
> > module sqlite3.
> >
> > If for whatever reason you need the latest SQLite module for Python
> > (2.5.0), you can simply grab an rpm or build it from source and
> > install it to your home directory. To build pysqlite you need the
> > SQLite headers. If you can't install those to default path then
> > simply grab the headers, put them somewhere into your home directory
> > and tell the pysqlite build process where to find them.
>
> Okay, sorry if I haven't been specific enough. I don't know about the
> original poster, but on the box I'm using, I don't have the latest
> Python, the "make" command breaks because the system doesn't have the
> proper libraries, and there is no sqlite3 module. I am not authorized
> to fix any of that, and our support team isn't interested in helping
> me because it's a Perl shop, not Python.
>
> I'm not demanding that anyone solve my problem. I'm just asking if
> there are files I can download and without compiling or building them
> in any way, put them somewhere, point Python to that path, and be able
> to use sqlite from Python.
I more or less answered that already: you can grab a rpm for the same
Python version as you already have, unpack it and put the sqlite3
support files somewhere into your home directory (~/bin/python/site-
packages for example). If your Python is older than 2.5 then you have to
download the pysqlite rpms for your distribution and do the same as
above. To have Python find the modules you have to set the PYTHONPATH
environment variable. See the man page.
If your distribution doesn't provide RPMs for pysqlite then you have to
build it yourself. You have to grab the SQLite headers (they are in the
SQLite RPM probably), unpack them somewhere into your home directory and
tell the pysqlite build process where to find them. I don't exactly know
how but this is probably very easy to find out.
Thorsten
More information about the Python-list
mailing list