Python sqlite issue

I’m trying to utilize python sqlite but it wouldn’t load.
I guess I’ve already installed all necessary packages through either zypper or pip but I must be missing something:
ImportError: No module named sqlite3

Command used was:
from sqlite3 import dbapi2 as sqlite

What am I missing?

Make sure to have the package python3-sqlite installed.

Which you should already have, if you have pyotherside-qml-plugin-python3-qt5 installed. Which you should have if you are developing python apps for Sailfish OS.

Yea this package is already installed.
I’ve installed Kodi from Openrepos and I’m trying to get some plugins to work.
I had no issues borrowing libvidewine and sime other packages from fedora/openelec and some DRM-protected content like DAZN or Joyn does already work. However, the amazon prime plugin seems to rely on sqlite and I can’t find the related packages.
Don’t know if I have pyotherside installed already. It might has come as a dependency to one of the warehouse packages though.

Do we assume that you’ve added the QT += sql in your .pro file?

I wasn’t aware I had a .pro file at all?
Where would that be located?
For testing, I’m currently invoking python from the command line and I’m entering the import command directly:
from sqlite3 import dbapi2 as sqlite
That does not work. Do I have to preload anything, or am I just missing some related packages?

This is working for me with the python3-sqlite package. Notice that this is a Python3 package. So you need to strat the interpreter with python3. python is still launching the old python 2 and there is indeed no sqlite support anymore in SailfishOS for Python2.

That does the trick, thank you! I hope I can figure out how to get the module calling the right python instance in the next step. Doesn’t seem to help to change the python environment call in the file invoking the api alone. I’ll play around a bit but I have the feeling this might work out after all:)

To whom it may concern:
I installed pysqlite from the scratch ( install).
Than I had to change the API call in the amazon plugin from
from sqlite3 import dbapi2 as sqlite
from pysqlite2 import dbapi2 as sqlite

Now I have a full featured Kodi on my Gemini PDA and can enjoy the full amazon prime content.

PS: I know that retrieving DRM-protected content on SfOS is somewhat against the nature of the OS, but well, I see it rather as a compromise…