Re: [pysqlite] Error during test period of installing pysqlite
Gerhard Häring <[email protected]> Thu, 23 Jul 2009 18:46:04 +0200
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Wei Wan wrote: > Hi: > I installed pysqlite-2.5.5 from source, and the two periods,"build" > and "install" are correct(I think it is), but when it came to "Test", > there occured a mistake with output likes below: > > [root@oneserver pysqlite-2.5.5]# python > Python 2.5.4 (r254:67916, Jul 21 2009, 10:48:33) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from pysqlite2 import test > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "pysqlite2/test/__init__.py", line 35, in <module> > from pysqlite2.test import dbapi, types, userfunctions, factory, > transactions,\ > File "pysqlite2/test/dbapi.py", line 27, in <module> > import pysqlite2.dbapi2 as sqlite > File "pysqlite2/dbapi2.py", line 27, in <module> > from pysqlite2._sqlite import * > ImportError: No module named _sqlite > > [root@oneserver pysqlite-2.5.5]# [...] Don't try to import pysqlite2 while being in the extracted directory. It will then always fail. Either install it and then import it from anywhere else or chdir to build/lib... if you haven't installed it, yet. > [...] > And i also tried to build with "build_static" instead, but it didn't > work, Any suggestions? Thank you! I assume that the same thing happened because of the same reasons. -- Gerhard