Description: Embed python in LibreOffice 24.8.2.1 can not import sqlite3 I fix by replace C:\Program Files\LibreOffice\program\sqlite3.dll with new one copy from native python3.9.13 Steps to Reproduce: 1.Open APSO 2.import sqlite3 Actual Results: Raise an error Expected Results: No error Reproducible: Always User Profile Reset: Yes Additional Info: I fix by replace C:\Program Files\LibreOffice\program\sqlite3.dll with new one copy from native python3.9.13
Yes, it's not supported, See the comment in https://opengrok.libreoffice.org/xref/core/external/python3/ExternalPackage_python3.mk?r=a3adfdb2
Hello Xisco, With the latest LO 25.2 dev master, I get: $ instdir/program/python Python 3.10.15 (main, Sep 24 2024, 13:53:16) [GCC 12.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL Python runtime state: initialized Current thread 0x00007f67115f8b80 (most recent call first): <no Python frame> Aborted (core dumped) Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: bb0e5aa97965b2710200da677db032289c373afe CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: CL threaded Is this a separate issue? There is another bug report for shipping PIP: tdf#162786 - Ship Python package manager (PIP) with LibreOffice internal Python https://bugs.documentfoundation.org/show_bug.cgi?id=162786
OS: Windows 10 Only Version 24.8 failed to import in my environment. No errors in other versions. That's very strange. Isn't the "sqlite3.dll" that comes with Version 24.8 (Python3.9) the wrong file for Version 25.2 (Python3.10)? It is a miracle that the file size of "sqlite3.dll" is the same in Python 3.9 and 3.10. But I'm not an expert and I don't know how to prove it. It's just a hypothesis. (Translated by Textra)
It worked in the following environments. OS:Windows 10 LibreOffice_24.8.3.1_Win_x86-64.msi
I copied "sqlite3.dll" installed by "LibreOfficePortable_24.8.2_MultilingualStandard.paf.exe".
After bug 162786 has been fixed, you can do instdir/program/python -m pip install pysqlite3 --user to install it and use "import pysqlite3" I think this can be closed as RESOLVED FIXED