Re: Correctly Importing SQLite3 in Python-2.5
Gerhard Haering <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <359238e06b698da61b8c66b4365ca13e@localhost> |
On Sun, 11 Nov 2007 16:54:47 -0800 (PST), Rich Shepard <[email protected]> wrote: > I recall reading that SQLite3 is built into Python-2.5 now, so instead > of > writing 'from pysqlite2 import dbapi2 as sqlite3' we write 'import > sqlite3'. > [...] > from _sqlite3 import * > ImportError: No module named _sqlite3 How did you install Python 2.5? From a distribution package or manually? If you installed from a distribution package, the person creating the package is to blame ;-) Maybe (but unlikely) there's a separate Python package for your distribution then that includes the necessary files. Otherwise, you are to blame because you didn't install the SQLite 3.x headers and libraries first. The package in question to install will be named libsqlite.*-dev(el). Install it, rebuild/reinstall Python 2.5 and you should be fine. -- Gerhard