Python 2.5+版本中包含了sqlite3模块,但是我只能使用2.4版本。我上传了sqlite3模块文件,并将其目录添加到sys.path中,但是当我尝试导入时会出现以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "sqlite3/__init__.py", line 23, in ?
from dbapi2 import *
File "sqlite3/dbapi2.py", line 26, in ?
from _sqlite3 import *
ImportError: No module named _sqlite3
文件“_sqlite3”位于lib-dynload中,但如果我将其包含在sqlite3目录中,则会出现其他错误。
有什么建议吗? 我正在一个受限制的环境中工作; 我没有访问GCC等其他资源的权限。
libsqlite3-dev
来源:http://superuser.com/questions/122140/problem-with-installing-sqlite3-module-for-python-2-6-on-an-ubuntu-system - inakiabt