Why does
from pysqlite2 import dbapi2 as sqlite
cause
ImportError: No module named pysqlite2
Isn’t pysqlite2 already installed in Python 2.6.5?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The module is called
sqlite3.pysqlite2was the module’s name before it became part of the Python standard library.You probably want to use this in your code:
And the standard documentation is here: http://docs.python.org/library/sqlite3.html
edit: And just to cover all the bases:
The
sqlite3module also has adbapi2sub-member, but you don’t need to use it directly. Thesqlite3module exposes all thedbapi2members directly.