Installing PySQLite on OS X 10.4
Rob Cowie
cowie.rob at gmail.com
Wed Mar 15 09:15:55 EST 2006
Fredrik Lundh wrote:
> Rob Cowie wrote:
>
> > There are some notes on the pysqlite wiki regarding modification of the
> > setup.py 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
> "setup.py install" step put the modules ? is that directory on the Python path ?)
>
> </F>
True... I should have included this stuff.
the output from "setup.py install" indicates that an egg is constructed
and copied to
"/Library/Python/2.3/site-packages/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg".
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/__init__.py", line 25, in ?
from pysqlite2.test import dbapi, types, userfunctions, factory,
transactions
File "pysqlite2/test/dbapi.py", line 26, in ?
import pysqlite2.dbapi2 as sqlite
File "pysqlite2/dbapi2.py", 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
correctly?
More information about the Python-list
mailing list