欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ImportError: No module named _sqlite 测试失败提示 SQLiteRedHatGoogleHTML 

程序员文章站 2024-02-10 20:33:16
...
   自己编译pysqlite2的时候,编译安装成功没有错误提示,可是测试"from pysqlite2 import test"的时候,却出现错误:
  >>> from pysqlite2 import test
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 27, in ?
    from pysqlite2._sqlite import *
ImportError: No module named _sqlite
  感到比较郁闷,经google和摸索,发现只在build的跟目录下,才出现这个问题.
 
参考:https://www.redhat.com/archives/fedora-extras-list/2006-April/msg00853.html