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
plain vanilla compilation of the the 2.5 beta and trying
the SQLite code given in the release notes I get the message
"NameError: name 'sqlite3' is not defined".
I wonder what the requirement means that "when the necessary
headers are available"? How would they need to be made
available?
Does anyone have any success with this? 2 3625
Harold Shore <hs****@1st-spot.net> writes: 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 plain vanilla compilation of the the 2.5 beta and trying the SQLite code given in the release notes I get the message "NameError: name 'sqlite3' is not defined".
I wonder what the requirement means that "when the necessary headers are available"? How would they need to be made available?
Does anyone have any success with this?
It seems to work okay for me.
$ python2.5
Python 2.5b1 (r25b1:47027, Jun 21 2006, 19:41:51)
[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
Type "help", "copyright" , "credits" or "license" for more information. import sqlite3 sqlite3.sqlite_ version
'3.1.2'
On my system, the header file is
/usr/include/sqlite3.h
and the library file is
/usr/lib64/libsqlite3.so
Those are both standard locations, so configure found them on its
own. If they are someplace unusual, you'll have to tell configure
where they are. It's possible you have SQLite3 installed, but you lack
the header. My system uses RPM, so I had to install both sqlite
and sqlite-devel before building Python. The sqlite-devel package
contains the header.
I hope this helps,
Tim
Harold Shore wrote: I do have SQLite3 installed on my system, but after doing a plain vanilla compilation of the the 2.5 beta and trying the SQLite code given in the release notes I get the message "NameError: name 'sqlite3' is not defined".
I wonder what the requirement means that "when the necessary headers are available"? How would they need to be made available?
if you're installing from RPM:s (or similar), look for -dev or -devel
packages.
most package providers distinguish between runtime files (required to
run a prebuilt program that's been linked against a specific library)
and development files (required to actually build such a program).
</F> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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: Victor Lin |
last post by:
Now I am now developing a program that base on sqlite3 in python.
But there is a strange problem.
That is, all data I insert into sqlite database do not goes into file
in disk.
It is really strange....
Why do these data just keep in memory and discarded?
All things that really store in file is the table.
If I create a table, it would appears in the sqlite 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: milan_sanremo |
last post by:
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) 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:
|
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: 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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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.
| |