How to install pysqlite?

R

Roman Gorbunov

Hi all,

I am trying to install pysqlite (Python interface to the SQLite). I
downloaded the file with the package (pysqlite-2.5.5.tar.gz). And I
did the following:

gunzip pysqlite-2.5.5.tar.gz
tar xvf pysqlite-2.5.5.tar
cd pysqlite-2.5.5
python setup.py install

At the last step I have a problem. I get the following error message:
error: command 'gcc' failed with exit status 1

I found that other peoples also had this problem. For example here:
http://forums.opensuse.org/applications/400363-gcc-fails-during-pysqlite-install.html

As far as I understood in the person had a problem because sqlite2 was
not installed. But in my case, I have sqlite3 (I can run it from
command line).

May be I should change some paths in "setup.cfg"? At the moment I have
there:
#define=
#include_dirs=/usr/local/include
#library_dirs=/usr/local/lib
libraries=sqlite3
define=SQLITE_OMIT_LOAD_EXTENSION

And if I type "which sqlite3" I get:
/usr/bin/sqlite3

Can anybody pleas help me with that problem.

Thank you in advance.
 
D

Diez B. Roggisch

Roman said:
Hi all,

I am trying to install pysqlite (Python interface to the SQLite). I
downloaded the file with the package (pysqlite-2.5.5.tar.gz). And I
did the following:

gunzip pysqlite-2.5.5.tar.gz
tar xvf pysqlite-2.5.5.tar
cd pysqlite-2.5.5
python setup.py install

At the last step I have a problem. I get the following error message:
error: command 'gcc' failed with exit status 1

Please show us the *whole* error.

Diez
 
D

Daniel Fetchinson

I am trying to install pysqlite (Python interface to the SQLite). I
downloaded the file with the package (pysqlite-2.5.5.tar.gz). And I
did the following:

gunzip pysqlite-2.5.5.tar.gz
tar xvf pysqlite-2.5.5.tar
cd pysqlite-2.5.5
python setup.py install

At the last step I have a problem. I get the following error message:
error: command 'gcc' failed with exit status 1

I found that other peoples also had this problem. For example here:
http://forums.opensuse.org/applications/400363-gcc-fails-during-pysqlite-install.html

As far as I understood in the person had a problem because sqlite2 was
not installed. But in my case, I have sqlite3 (I can run it from
command line).

May be I should change some paths in "setup.cfg"? At the moment I have
there:
#define=
#include_dirs=/usr/local/include
#library_dirs=/usr/local/lib
libraries=sqlite3
define=SQLITE_OMIT_LOAD_EXTENSION

And if I type "which sqlite3" I get:
/usr/bin/sqlite3

Can anybody pleas help me with that problem.

What version of python are you using?
From 2.5 onward python already includes pysqlite. Try 'import
sqlite3'. Python 2.5.1 includes pysqlite 2.3.2 while python 2.6.1
includes pysqlite 2.4.1 and python 3.0 includes also pysqlite 2.4.1.

You only need to install pysqlite separately if you explicitly need
the newer pysqlite version.

HTH,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top