I've just installed python 3.2.2 on ubuntu 10.04.3 (following all instraction from readme file) and tried to import sqlite3 module - the result:
No module named _sqlite3
Then I've looked into lib-dynload directory and there is no file _sqlite3.so (but it is in python 2.6).
How to fix this problem?
Thanks!
You don't need to install sqlite3 module. It is included in the standard library (since Python 2.5).
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With