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 2975
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.
>>importsqlit e3
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, theSQLite3heade r files
could not be found, so thesqlite3modul e 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 SQLite libraries
and headers installed before compiling Python, and the build
process will compile the module when the necessary headers
are available."
I do have SQLite3 installed on my system, but after doing a
|
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 new ...":
"""
# Create table
c.execute('''create table stocks
(date timestamp, trans varchar, symbol varchar,
qty decimal, price decimal)''')
|
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 = sqlite3.connect(':memory:')
conn.execute("create table foo (a int,b int)")
conn.execute('create view bar as select * from foo')
|
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 is 1, so when I do;
.... print s
....
(1, u'Spikedrivers Blues', u'Mississippi John Hurt')
|
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.
However, when I start python and do an import sqlite3 I get:
/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007, 05:19:30)
on sunos5
| |
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. It is stripped and thus cannot be relocated. This
causes the following exception on computers where something is already
loaded into the address the sqlite3.dll wants to use:
File "sqlite3\__init__.pyc", line 24, in <module>
File...
|
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 calls.
The relevant source code is here if you're interested:
http://svn.python.org/projects/python/trunk/Modules/_sqlite/cursor.c
|
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 than using the sqlite3
CLI and the .import command (reading the same data from a disk file,
even.) i find this surprising, executemany() i assume is using a
prepared statement and this is exactly what the .import command does
(based on my quick...
|
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 directory". So,
I assume that the absence of the "sqlite3.h" is the origin of the
problem.
I found on the web, that this file should be either in "/usr/local/
include" or in "/usr/local/lib". I check this directories and I really
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |