installing "pysqlite"

Paul Boddie paul at boddie.org.uk
Thu Mar 1 05:46:37 EST 2007


On 1 Mar, 10:34, "Nader" <n.em... at gmail.com> wrote:
>
> I have expanded the LD_LIBRARY_PATH to my home lib (export
> LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib).
> I have built and installed the 'pysqlite-2.3.3' with the next
> 'setup.cfg' :
>
> [build_ext]
> define=
> include_dirs=/usr/people/emami/include
> library_dirs=/usr/people/emami/lib
> #libraries=/usr/people/emami/lib/libsqlite3.so  (this line as a
> comment)

This looks alright. Be sure to verify that libsqlite3.so is in /usr/
people/emami/lib, although I suppose you've done this, looking at your
comment.

> The resutl of this process was:
>
> running install_lib
> copying build/lib.linux-i686-2.4/pysqlite2/_sqlite.so -> /usr/people/
> emami/lib/python2.4/site-packages/pysqlite2
> running install_data
>
> This message had given after installing. I have controll the '/usr/
> people/emami/lib/python2.4/site-packages/pysqlite2' whether the
> '_sqlite.so' has copied there. Yes it has. Okay!

So pysqlite2 has installed properly at least.

> I go to python and I give the next command:
>
> >>> from pysqlite import test
>
> and Unfortunately I get the next error message:

[...]

> ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/
> _sqlite.so: undefined symbol: sqlite3_set_authorizer

I'm running out of ideas here, but you could try doing this:

ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so

This should show a list of references to libraries, but if one of them
is missing in some way then it means that it isn't found by the linker
and it's not on the LD_LIBRARY_PATH. Another thought is that
sqlite3_set_authorizer isn't found in the SQLite library - you can
test this by doing the following:

nm /usr/people/emami/lib/libsqlite3.so

I get something like this in response:

00000000000110b0 T sqlite3_set_authorizer

If you don't get anything in response or if you see "U" instead of
"T", then this might indicate an problem with the way SQLite has been
configured.

> Do you know what option I have to give to if I want to use the
> 'easy_install" tool?
> %easy_install pysqlite (with some optione with which it cab find the
> installed 'libsqlite.so')

I'm no easy_install expert, I'm afraid. You might want to talk to the
pysqlite people directly if what I've suggested doesn't help you
further:

http://www.initd.org/tracker/pysqlite/wiki/pysqlite

Paul




More information about the Python-list mailing list