sqlite3 and Python 2.5.1

M

milan_sanremo

I have sqlite installed, but when I try to import sqlite3 I receive:

Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):

Yet:

# find /usr/local/python -name "sqlite*" -print
/usr/local/python/lib/python2.5/sqlite3

# /opt/csw/bin/sqlite3
SQLite version 3.2.2
Enter ".help" for instructions
sqlite>

What is missing?
 
L

Lie

I have sqlite installed, but when I try to import sqlite3 I receive:

Python 2.5.1 (r251:54863, Nov  3 2007, 02:54:36) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sqlite3



Yet:

# find /usr/local/python -name "sqlite*" -print
/usr/local/python/lib/python2.5/sqlite3

# /opt/csw/bin/sqlite3
SQLite version 3.2.2
Enter ".help" for instructions
sqlite>

What is missing?

Did you, by chance, happened to compile your Python yourself? From
what I see here:
http://www.megasolutions.net/python/python-unix-install,-sqlite3-78710.aspx
Python's source doesn't include the sqlite3 source, it only contains
pysqlite interface, so when compiling python you need to get sqlite3
too.
 
G

Gerhard Häring

milan_sanremo said:
I have sqlite installed, but when I try to import sqlite3 I receive:

Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sqlite3

Yet:

# find /usr/local/python -name "sqlite*" -print
/usr/local/python/lib/python2.5/sqlite3

# /opt/csw/bin/sqlite3
SQLite version 3.2.2
Enter ".help" for instructions
sqlite>

What is missing?

You compiled Python yourself. During that, the SQLite3 header files
could not be found, so the sqlite3 module was not compiled/installed.

-- Gerhard
 
R

Robert Hancock

milan_sanremo said:
I have sqlite installed, but when I try to importsqlite3I receive:
Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
importsqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module namedsqlite3

# find /usr/local/python -name "sqlite*" -print
/usr/local/python/lib/python2.5/sqlite3
# /opt/csw/bin/sqlite3
SQLite version 3.2.2
Enter ".help" for instructions
sqlite>
What is missing?

You compiled Python yourself. During that, theSQLite3header files
could not be found, so thesqlite3module was not compiled/installed.

-- Gerhard

Thanks, I'll recompile.
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top