(in memory) database

Cameron Laird claird at lairds.us
Sun Aug 31 14:05:08 EDT 2008


In article <b68940e4-78cc-4fbb-94cd-69478d45f96c at 26g2000hsk.googlegroups.com>,
Paul Boddie  <paul at boddie.org.uk> wrote:
>On 31 Aug, 16:45, cla... at lairds.us (Cameron Laird) wrote:
>> Yes and no.  My own experience with Debian packages is that with a
>> standard
>>   apt-get install python2.5
>> an attempt to
>>   import sqlite3
>> results in
>>   ImportError: No module named _sqlite3
>
>That's strange from the perspective of the Debian package information:
>
>http://packages.debian.org/etch/python2.5
>http://packages.debian.org/lenny/python2.5
>
>Both have libsqlite3-0 as a dependency. On my Ubuntu system, the same
>dependency applies.
>
>> that is, <URL:https://bugzilla.novell.com/show_bug.cgi?id=228733>.
>
>I'm not sure Novell can help with the matter, though. ;-)
>
>> I recognize the error was resolved nearly two years ago,
>> but I, for one, don't understand how to express the resolution in
>> terms of Debian packages.  Is there a way to install Python and have
>> it manage SQLite3 correctly withOUT configuring recent sources "by
>> hand"?
>
>Which Debian version and which package repository? I imagine that
>there may have been backports of Python 2.5 to Debian 3.1 (Sarge) and
>earlier, but my own experience with sqlite prior to running Python 2.5
>on Ubuntu involved use of the pysqlite2 module with Python 2.4
>instead. Since Python 2.5 became the default on Ubuntu, I don't recall
>having any problems with sqlite.
>
>Paul

Thanks for pursuing this, Paul.  You have me curious now.

Let's take a definite example:  I have a convenient
    Ubuntu 8.04.1
The content of /etc/apt/sources.list is
    deb http://us.archive.ubuntu.com/ubuntu hardy main restricted
    deb http://us.archive.ubuntu.com/ubuntu hardy-updates main restricted
    deb http://us.archive.ubuntu.com/ubuntu hardy universe multiverse
    deb http://security.ubuntu.com/ubuntu hardy-security main restricted
I do
    apt-get update
    apt-get upgrade
    apt-get install python2.5
then
    # python2.5
    Python 2.5 (r25:51908, Dec 11 2006, 21:09:56)
    [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sqlite3
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
        from dbapi2 import *
      File "/usr/local/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
        from _sqlite3 import *
    ImportError: No module named _sqlite3

How do you interpret this?



More information about the Python-list mailing list