installing "pysqlite"

Paul Boddie paul at boddie.org.uk
Wed Feb 28 06:51:35 EST 2007


On 28 Feb, 12:07, Nader Emami <e... at knmi.nl> wrote:
>
> I am back with another problem. I suppose that I can tell it!
> I have installed both, 'sqlite' and 'pysqlite' without any problem. But
> If I try to test whether the 'pysqlite' interface works, I get the next
> error message:

[...]

> /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so:
> undefined symbol: sqlite3_set_authorizer
>
> I don't understand it. Could you tell me how I can solve this last
> point? I hope so!

It looks like Python (although it's really the dynamic linker) can't
locate the SQLite libraries. If you have installed SQLite into a non-
standard place, which I'm guessing is the case, then you will need to
set your LD_LIBRARY_PATH environment variable to refer to the
directory where the libraries were installed.

So, if you installed SQLite into /usr/people/emami and you see files
like libsqlite3.so in /usr/people/emami/lib, then you need to change
your LD_LIBRARY_PATH as follows:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib

(The actual directory should be the same as the one you specified for
library_dirs in the setup.cfg file for pysqlite.)

If you're not using bash as your shell, the syntax for the command may
be different. Don't forget to add this command to your shell
configuration file (eg. .bashrc) so that your system remembers this
information.

Paul




More information about the Python-list mailing list