How to build the pysqlite? Where to find the "sqlite3.h"?

saju.pillai at gmail.com saju.pillai at gmail.com
Wed Nov 5 11:58:38 EST 2008


On Nov 5, 9:22 pm, "Shawn Milochik" <Sh... at milochik.com> wrote:
> This is all useful and interesting stuff, but I don't think any of it
> addresses the original poster's problem, which is that he has no root
> access to a Linux or Unix box, and wants to get pysqlite2 working in
> his home directory. I have exactly the same problem. I have tried the
> "python setup.py install --home=~" method, and I get errors from GCC
> that I have no permissions (and to be honest, nor the knowledge) to
> overcome.
>
> Isn't there anyway to get a Linux binary that can just be put
> somewhere in the Python path so we can use sqlite? Or are those of us
> without admin/root control of our boxes screwed?

1. Get sqlite3 from http://www.sqlite.org/sqlite-3.6.4.tar.gz
2. build and install sqlite3 (./configure --prefix=/any/writeable/dir
&& make install) -- you may want to supply the --disable-tcl flag if
you hit permission problems
3. get pysqlite3, edit setup.cfg libraries and include lines to point
to the lib/ and include/ dir where you installed sqlite3 in the
previous step
4. python setup.py install --home=somewhere
5. PYTHONPATH=somewhere ./python -- import pysqlite2 should work for
you



More information about the Python-list mailing list