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.
>>import sqlite3
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? 3 2952
On Jun 17, 12:59*am, milan_sanremo <hancock.rob...@gmail.comwrote:
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.
>>import sqlite3
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/...te3-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.
milan_sanremo wrote:
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.
>>>import sqlite3
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
On Jun 16, 5:15 pm, Gerhard Häring <g...@ghaering.dewrote:
milan_sanremo wrote:
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
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, theSQLite3header files
could not be found, so thesqlite3module was not compiled/installed.
-- Gerhard
Thanks, I'll recompile. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Harold Shore |
last post by:
From the release notes I read that
"If you're compiling the Python source yourself, note that
the source tree doesn't include the SQLite code, only the
wrapper module. You'll need to have the...
|
by: John Machin |
last post by:
Apologies in advance if this is a bit bloggy, but I'd like to get
comments on whether I've lost the plot (or, more likely, failed to
acquire it) before I start reporting bugs etc.
From "What's...
|
by: Josh |
last post by:
Hi,
I'm running into a problem when trying to create a view in my sqlite
database in python. I think its a bug in the sqlite3 api that comes with
python 2.5.
This works as expected:
conn =...
|
by: Jorgen Bodde |
last post by:
Hi all,
I am using sqlite3 in python, and I wonder if there is a way to know
if there are valid rows returned or not. For example I have a table
song with one entry in it. The ID of that entry...
|
by: Simon |
last post by:
I installed the source code on unix for python 2.5.1. The install went
mainly okay, except for some failures regarding:
_ssl, _hashlib, _curses, _curses_panel.
No errors regarding sqlite3....
|
by: Josh Ritter |
last post by:
A number of our Windows customers have an issue with the sqlite3 module
included with Python 2.5.1
We've tracked the problem down to the sqlite3.dll included with the Python
2.5.1 distrubtion. ...
|
by: David |
last post by:
- Are there any peculiarities with using curs.executemany(...) vs. multiple
How many times are you calling execute vs a single executemany? The
python call overhead will add up for thousands of...
|
by: Ben Lee |
last post by:
hi folks --
a quick python and sqlite3 performance question. i find that
inserting a million rows of in-memory data into an in-memory database
via a single executemany() is about 30% slower...
|
by: Kurda Yon |
last post by:
Hi,
I try to "build" and "install" pysqlite? After I type "python setup.py
build" I get a lot of error messages? The first error is "src/
connection.h:33:21: error: sqlite3.h: No such file or...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |