i am using python 2.7.11 on virtualenv in lubuntu 12.04.(dont own a good laptop its dell latitude d600)
Python 2.7.11 (default, Mar 4 2016, 04:38:41)
[GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sqlite3 Traceback (most recent call last): File "", line 1, in File "/home/maharshi/.localpython/lib/python2.7/sqlite3/init.py", line 24, in from dbapi2 import * File "/home/maharshi/.localpython/lib/python2.7/sqlite3/dbapi2.py", line 28, in from _sqlite3 import * ImportError: No module named _sqlite3
i have installed pysqlite using pip and it says successfull.
(p2.7) maharshi@maharshi-Latitude-D600:~/code$ which python
/home/maharshi/virtualenvs/p2.7/bin/python
(p2.7) maharshi@maharshi-Latitude-D600:~/code$ which pip
/home/maharshi/virtualenvs/p2.7/bin/pip
(p2.7) maharshi@maharshi-Latitude-D600:~/code$ pip install pysqlite
Requirement already satisfied (use --upgrade to upgrade): pysqlite in /home/maharshi/virtualenvs/p2.7/lib/python2.7/site-packages
i also installed it manually at both locations i.e
~/virtualenvs/p2.7/
~/.localpython/ (from where i created the virtualenv)
i also installed "libsqlite3-dev
(as suggested by one of the posts)" i.e
sudo apt-get install libsqlite3-dev
Thank you in advance.