Bug 59954 - unable to import sqlite library from libreoffice's embedded python
Summary: unable to import sqlite library from libreoffice's embedded python
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.2 rc
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 05:10 UTC by jmxhyz
Modified: 2014-01-11 02:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmxhyz 2013-01-28 05:10:06 UTC
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.
Comment 1 Michael Stahl (allotropia) 2013-02-08 19:05:34 UTC
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 :(
Comment 2 jmxhyz 2014-01-11 02:37:36 UTC
I copy the sqlite3 module from a full version of python3.3.0.
Marked as resolved.