Python 3.2: can't import sqlite3 module
If you installed from source, you need to install the development libraries for sqlite3.
sudo apt-get install libsqlite3-dev
You probably also want to install libreadline-dev
and libssl-dev
.
Download python 3.3.2 http://www.python.org/getit/
The development libraries
for sqlite3 (and other modules like readline, ssl, etc.) need to be installed before compiling Python from source.
The C source code for the Python sqlite module is included with Python's source; however it requires the presence of sqlite3's development file to compile. It is not a separate library but part of Python.
If you installed from source, you need to install the development libraries for sqlite3.
sudo apt-get install libsqlite3-dev
What are the packages/libraries I should install before compiling Python from source? https://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so
sudo apt-get install libreadline-dev
sudo apt-get install libssl-dev
List of common dev environments ...
build-essential (obviously)
libz-dev (also pretty common and essential)
libreadline-dev (or the Python prompt is crap)
libncursesw5-dev
libssl-dev
libgdbm-dev
libsqlite3-dev
libbz2-dev
liblzma-dev
tk-dev
libdb-dev
libncursesw5-dev
libreadline5-dev
libssl-dev
libgdbm-dev
libc6-dev
Install Python
tar xf Python-3.3.2.tar.xz
./configure
make
sudo make all install