Python3-pysqlite3 not found in apalis-imax8-dunfell branch

Hello team,

I have an Apalis-Imax8QP device running Yocto Dunfell. I am attempting to execute a Python script designed to read data from a SQLite3 database and process it. However, when I run the Python script, it throws the following error:
import sqlite3
ModuleNotFoundError: No module named ‘sqlite3’

Hi @vinodg,

Thanks for writing to Toradex community.

To completely understand your question do share BSP and complete hardware details.

I have an Apalis-Imax8QP device running Yocto Dunfell

Let us assume you are running tdx-reference-multimedia-image which does have python3 in default image so that allows you to run python script.

I am attempting to execute a Python script designed to read data from a SQLite3 database and process it. However, when I run the Python script, it throws the following error:
import sqlite3
ModuleNotFoundError: No module named ‘sqlite3’

  • So to solve this issue you will need to build yocto image with python3-pip

  • python3-pip by default is not part of reference image.

  • Once you build image with python3-pip, this will enable to install packages using pip.

  • Also it depends if sqilite package do not need cross compiling then it should install fine using pip install command.

Let me know if you have further queries.

Best Regards
Ritesh Kumar