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’
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.