installing "pysqlite"

Nader Emami emami at knmi.nl
Tue Feb 27 10:34:52 EST 2007


Paul Boddie wrote:
> On 27 Feb, 13:35, "Nader" <n.em... at gmail.com> wrote:
>> Thank for your reaction. I don't know also how the interaction sith
>> 'easy_install' is. I think that I have to install 'pysqlite' from
>> source code also, because i can change ther the 'setup.cfg' file and I
>> can give there where the 'libsqlie3' is.
> 
> What I did was to go to the pysqlite site (http://www.initd.org/
> tracker/pysqlite/wiki/pysqlite), download the sources for the latest
> version, then change the setup.cfg file so that include_dirs refers to
> the place where the SQLite headers (eg. sqlite.h) were installed, and
> that library_dirs refers to the place where the SQLite libraries were
> installed. For example:
> 
> include_dirs=/opt/sqlite/usr/include
> library_dirs=/opt/sqlite/usr/lib
> 
> (You'd get the above if you configured SQLite to install into /opt/
> sqlite/usr.)
> 
> Then, just do the usual build:
> 
> python setup.py build
> 
> And install with a prefix:
> 
> python setup.py install --prefix=/opt/pysqlite/usr
> 
> Since you seem to be installing things in non-root-controlled places,
> I imagine you're familiar with specifying things like the --prefix
> above, as well as setting up your PYTHONPATH afterwards.
> 
> Paul
> 
I have first installed "sqlite" and then I have configure the 
"setup.cfg" file of "pysqlite" package. I had to do two things in
'pysqlite' directory:
1- python setup.py build
2- python setup.py install

It has done without any error. I suppose that the installation is well 
done, but I haven't yet test whether I can import the 'pysqlite' module 
in python. But how you mean about "PYTHONPATH"? If I do "echo 
$PYTHONPAT" i get an empty string. That meant that I don't have any 
"PYTHONPATH". How can I assign a correct "path" to this variable?

Nader



More information about the Python-list mailing list