473,583 Members | 3,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python 2.5 and sqlite

Hi all,

On a (sun) webserver that I use, there is python 2.5.1 installed. I'd
like to use sqlite3 with this, however sqlite3 is not installed on the
webserver. If I were able to compile sqlite using a sun machine (I
normally use linux machines) and place this in my lunix home account
would I be able to use python and sqlite?

Any thoughts? I know its a bit of a stretch ...
Nov 10 '08 #1
20 3963
Quoting "ti*******@gmai l.com" <ti*******@gmai l.com>:
Hi all,

On a (sun) webserver that I use, there is python 2.5.1 installed. I'd
like to use sqlite3 with this, however sqlite3 is not installed on the
webserver. If I were able to compile sqlite using a sun machine (I
normally use linux machines) and place this in my lunix home account
would I be able to use python and sqlite?

Any thoughts? I know its a bit of a stretch ...
Can you ask them if sqlite3 is installed? and if not... to install it?

You could include in your discussions "well sqlite3 is part of python"
"if it isn't, you haven't installed python properly"

Worth a try...

Nov 10 '08 #2
* ti*******@gmail .com (Mon, 10 Nov 2008 15:33:22 -0800 (PST))
On a (sun) webserver that I use, there is python 2.5.1 installed. I'd
like to use sqlite3 with this, however sqlite3 is not installed on the
webserver.
Python comes with SQLite support. It's not necessary to have SQLite
installed for that.
If I were able to compile sqlite using a sun machine (I normally use
linux machines) and place this in my lunix home account would I be
able to use python and sqlite?
Just go ahead and import sqlite3

Thorsten
Nov 11 '08 #3
* (Mon, 10 Nov 2008 18:48:28 -0500)
Quoting "ti*******@gmai l.com" <ti*******@gmai l.com>:
On a (sun) webserver that I use, there is python 2.5.1 installed. I'd
like to use sqlite3 with this, however sqlite3 is not installed on the
webserver. If I were able to compile sqlite using a sun machine (I
normally use linux machines) and place this in my lunix home account
would I be able to use python and sqlite?

Any thoughts? I know its a bit of a stretch ...

Can you ask them if sqlite3 is installed? and if not... to install it?
Why would he have to install SQLite?!
You could include in your discussions "well sqlite3 is part of python"
"if it isn't, you haven't installed python properly"
Sqlite3 is an optional part of Python. It has no dependencies on SQLite.

Thorsten
Nov 11 '08 #4
* Thorsten Kampe (Tue, 11 Nov 2008 10:45:28 +0100)
* (Mon, 10 Nov 2008 18:48:28 -0500)
Can you ask them if sqlite3 is installed? and if not... to install it?

Why would he have to install SQLite?!
You could include in your discussions "well sqlite3 is part of python"
"if it isn't, you haven't installed python properly"

Sqlite3 is an optional part of Python. It has no dependencies on SQLite.
It seems it's not that simple. On a Gentoo host the SQLite package
provided the necessary library. On a openSUSE host it was libsqlite.
From my understanding SQLite (the headers) is only needed for building
python with SQLite support (or pysqlite) from scratch.

Thorsten
Nov 11 '08 #5
Sqlite3 is an optional part of Python. It has no dependencies on SQLite.

That's not true. To build the _sqlite3 module, you need the SQLite3
sources or binaries, in addition to the Python sources.

Regards,
Martin
Nov 11 '08 #6
* "Martin v. Löwis" (Tue, 11 Nov 2008 20:54:37 +0100)
Sqlite3 is an optional part of Python. It has no dependencies on
SQLite.

That's not true. To build the _sqlite3 module, you need the SQLite3
sources or binaries, in addition to the Python sources.
That's not what I meant: the question is, do you need SQLite /after/
you've built from source or if you install the Python binary.

Thorsten
Nov 11 '08 #7
On Tue, Nov 11, 2008 at 6:04 PM, Thorsten Kampe
<th******@thors tenkampe.dewrot e:
* "Martin v. Löwis" (Tue, 11 Nov 2008 20:54:37 +0100)
Sqlite3 is an optional part of Python. It has no dependencies on
SQLite.

That's not true. To build the _sqlite3 module, you need the SQLite3
sources or binaries, in addition to the Python sources.

That's not what I meant: the question is, do you need SQLite /after/
you've built from source or if you install the Python binary.
Is that some form of tricky question ? The binary package either comes
with the sqlite lib, or in the case of linux distributions, the
package requires the installation of sqlite lib. If you try removing
the sqlite lib package (in Linux), the package manager will tell you
that python depends on it.
Thorsten
--
http://mail.python.org/mailman/listinfo/python-list


--
-- Guilherme H. Polo Goncalves
Nov 11 '08 #8
That's not what I meant: the question is, do you need SQLite /after/
you've built from source or if you install the Python binary.
Depends on how you built SQLite on your system. If it was a static
library, you won't need it - if it is a shared library, you certainly
need the shared library at run-time.

Regards,
Martin
Nov 11 '08 #9
* "Martin v. Löwis" (Tue, 11 Nov 2008 21:40:44 +0100)
That's not what I meant: the question is, do you need SQLite /after/
you've built from source or if you install the Python binary.

Depends on how you built SQLite on your system. If it was a static
library, you won't need it - if it is a shared library, you certainly
need the shared library at run-time.
Aah, thanks. Makes sense a lot. There were quite a few people here in
the last few days who asked how to build or use Python (or pysqlite)
when SQLite is not installed (and they can't because it's not their
system). I always said that it's not necessary to have SQLite installed
for /running/ Python. Seems that I was "65%" right.

Thorsten
Nov 11 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1493
by: Gerhard Haering | last post by:
Last December, we had a short thread discussing (in python-dev) the integration of PySQLite into Python 2.4. At the time, I was against inclusion, because I thought PySQLite was not ripe for it, mostly because I thought the API was not stable. Now, I have started writing a new PySQLite module, which has the following key features: - Uses...
8
2293
by: Vittorio | last post by:
I am reading "Beginning Python from Novice to Professional" and the book is really awesome. Nonetheless on ch 13 "Database Support" I found this code to import data (in a txt file) into a SQLite Database: #this was corrected because original "import sqlite" does not work from pysqlite2 import dbapi2 as sqlite #this function strips the txt...
0
1599
by: Martijn de Munnik | last post by:
Hi, I'm trying to build/install pysqlite on a Solaris 10 platform. I've got Sun Studio 11 on a AMD 64 platform and got this error. I'm a python newbie and just want to install trac. I've got ActiveState python: ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on Python 2.4.3 (#1, Apr 3 2006, 18:07:58) on sunos5 Type...
1
1537
by: mikhail.savitsky | last post by:
Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main Python distribution (to compile with the new SQLite headers) - this is from Python docs. Therefore, inclusion of PySQLite in Python-2.5.1 distro...
3
275
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it is completely independent of the sqlite build. In other words, if your sqlite build supports full text searching you can use it through the python...
2
2017
by: Jean-Paul Calderone | last post by:
On Mon, 16 Jun 2008 08:39:52 +1000, Ben Finney <bignose+hates-spam@benfinney.id.auwrote: Maybe. I'm no expert on Debian packaging. However, exarkun@boson:~$ ls -l /usr/lib/python2.{4,5}/site-packages/sqlite/main.py lrwxrwxrwx 1 root root 63 2007-12-27 15:29 /usr/lib/python2.4/site-packages/sqlite/main.py...
0
1393
by: Guilherme Polo | last post by:
On Tue, Jul 1, 2008 at 9:51 PM, Joe Goldthwaite <joe@goldthwaites.comwrote: You need sqlite itself (www.sqlite.org) and bindings, pysqlite 2 (http://oss.itsystementwicklung.de/trac/pysqlite/) or aspw (http://code.google.com/p/apsw/) You are confused, yes. The sqlite3 package that comes with python2.5 is actually pysqlite2, which...
0
2567
by: Joe Goldthwaite | last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would automatically come with some version of sqlite. The fact that it doesn't is what was causing me to get the strange results. I downloaded the Windows version of the SQLite3.dll. I didn't know where to put it so I first put it in its own directory and tried to...
0
7895
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7826
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...
0
8182
Oralloy
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. ...
0
8327
jinu1996
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...
0
6579
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3818
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...
0
3843
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1433
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.