Installing PySQLite on OS X 10.4

Rob Cowie cowie.rob at
Wed Mar 15 15:15:55 CET 2006

Fredrik Lundh wrote:
> Rob Cowie wrote:
> > There are some notes on the pysqlite wiki regarding modification of the
> > script and I've followed them to no avail.
> >
> > Build and install appear to go smoothly but attempting to run the tests
> > from the python interpreter fails. Likewise any attempt to utilise
> > pysqlite2 in a python script fails.
> it's might be a bit easier to help if you what you did when attempting to use
> the library, and how things failed.
> (if you get an ImportError, are you importing the right thing?  where did the
> " install" step put the modules ?  is that directory on the Python path ?)
> </F>

True... I should have included this stuff.

the output from " install" indicates that an egg is constructed
and copied to

At the python prompt, I can "import pysqlite2" with no problems.

However, if I do "from pysqlite2 import test" as suggested after
installation, I get the following traceback...

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "pysqlite2/test/", line 25, in ?
    from pysqlite2.test import dbapi, types, userfunctions, factory,
  File "pysqlite2/test/", line 26, in ?
    import pysqlite2.dbapi2 as sqlite
  File "pysqlite2/", line 32, in ?
    from pysqlite2._sqlite import *
ImportError: No module named _sqlite

If I view my site-packages dir in the Finder, the .egg file appears as
a document, instead of a directory as is usually the case with .eggs.
Perhaps this is an indication that the .egg file is not being built

More information about the Python-list mailing list