ImportError: No module named pysqlite2 ImportError: No module named pysqlite2 sqlite sqlite

ImportError: No module named pysqlite2


The module is called sqlite3. pysqlite2 was the module's name before it became part of the Python standard library.

You probably want to use this in your code:

import sqlite3

And the standard documentation is here: http://docs.python.org/library/sqlite3.html

edit: And just to cover all the bases:

The sqlite3 module also has a dbapi2 sub-member, but you don't need to use it directly. The sqlite3 module exposes all the dbapi2 members directly.


You could probably just use sqlite3 which is now part of the standard library and should work exactly the same as pysqlite2 does. You can try to modify the file mentioned from:

from pysqlite2 import dbapi2 as sqlite

to

from sqlite3 import dbapi2 as sqlite


Try pip search sqlite, you may find many candidates. Pick something like this one:

 pip install pysqlite