unable to import sqlite library from libreoffice's embedded python in ubuntu 12.04 xxx@xxx:/opt/libreoffice4.0/program/python Python 3.3.0 (default, Jan 22 2013, 16:06:17) [GCC 4.2.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'sqlite' >>> import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'sqlite3' >>> import libsqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dynamic module does not define init function (PyInit_libsqlite3) >>> In the "/opt/libreoffice4.0/program" folder, there is a "libresqlite3.so", how to use SQLite3 in libreoffice or in Python.
sqlite (and all other python modules that have external dependencies) is intentionally disabled. i didn't know that we ship a libsqlite though... apparently it's from the NSS module... which needs python to build... so we'd get a cyclic build dependency trying to use that sqlite in python :(
I copy the sqlite3 module from a full version of python3.3.0. Marked as resolved.