installing "pysqlite"

Nader n.emami at gmail.com
Thu Mar 1 10:34:14 CET 2007


On Feb 28, 12:51 pm, "Paul Boddie" <p... at boddie.org.uk> wrote:
> 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

Hello

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)

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!
I go to python and I give the next command:
>>> from pysqlite import test

and Unfortunately I get the next error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/people/emami/lib/python2.4/site-packages/pysqlite2/test/
__init__.py", line 25, in ?
    from pysqlite2.test import dbapi, types, userfunctions, factory,
transactions,\
  File "/usr/people/emami/lib/python2.4/site-packages/pysqlite2/test/
dbapi.py", line 26, in ?
    import pysqlite2.dbapi2 as sqlite
  File "/usr/people/emami/lib/python2.4/site-packages/pysqlite2/
dbapi2.py", line 27, in ?
    from pysqlite2._sqlite import *
ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/
_sqlite.so: undefined symbol: sqlite3_set_authorizer

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')

Nader




More information about the Python-list mailing list