我的问题类似于ImportError: No module named _sqlite3还没有解决方案,
No module named _sqlite3我从源代码构建python,所以我的解决方案不应该通过安装一些软件包来解决我的问题......
我无法导入sqlite模块有点奇怪,为什么?
Python 2.7.3 (default, Sep 25 2012, 05:02:59)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sqlite
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mirror/ins/ins_py/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/home/mirror/ins/ins_py/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3