I'm trying to run a python application, but I'm getting an error that points to sqlite3 not existing. This is odd since sqlite3 has come standard with Python since 2.5. I am running Python 2.7.11. I can list Python modules and see sqlite3 using
pydoc modules
But I get the following error:
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
I tried to resolve this by installing pysqlite, as suggested by another user.
pip install pysqlite
But I encountered another error:
src/connection.h:33:21: error: sqlite3.h: No such file or directory
Which brings me back to my initial confusion.