Adding python packages on yocto

Hi all,

I am trying to add the below python packages to the Yocto image which we are creating for out custom board. I am able to see that packages is successfully placed in /usr/lib.python3.10/site-packages.

The issue we are facing is that, when we try to import the pyside2 using import pyside2, we get the import error

File “”, line 1, in
File “/usr/lib/python3.10/site-packages/pyside2/init.py”, line 107, in
_setupQtDirectories()
File “/usr/lib/python3.10/site-packages/pyside2/init.py”, line 58, in _setupQtDirectories
import shiboken2
File “/usr/lib/python3.10/site-packages/shiboken2/init.py”, line 27, in
from .shiboken2 import *
ImportError: /usr/lib/python3.10/site-packages/shiboken2/shiboken2.abi3.so: cannot open shared object file: No such file or directory

And also pydantic_core

import pydantic_core

File “/usr/lib/python3.10/site-packages/pydantic_core/init.py”, line 6, in
from ._pydantic_core import (
ModuleNotFoundError: No module named ‘pydantic_core._pydantic_core’

I have added my recipe files with this email. Kindly check and let me know the issues.

Hi, to fix the issue the missing dependencies must be added to the RDEPENDS:${PN} variable in the recipe.
RDEPENDS:${PN} = “python3-pydantic”

hi @kaam1,

thanks for your response, but unfortunately, this does not fix the issue

Hi @naveenkumar.muthusam ,
Please verify your steps from the belwo and let us know if you still face the issue

  1. Python in Linux
  2. Build image using Yocto

we have fixed this issue, as per the QT response Pyside6 packages supported on the yocto Linux.

we have added the recipe layers and it works.