Python package in installed version of slicer

Hi everyone,
We are working on a slicelet on Slicer v4.11.20210226. We are installing a library call weasyprint during compilation time. Everything is working fine in development environment. However, when we generate the installer, the application crashes at

import weasyprint

and generate an error when trying to do:

from PIL import Image

Same thing on slicer stable version. However, on the preview version, everything is fine.
Could anyone give me a hint to know what could have solved this issue at install?

Cheers,
Pierre

weasyprint has tons of dependencies - see WeasyPrint/first_steps.rst at master · Kozea/WeasyPrint · GitHub. You need to make sure that all those dependencies are bundled with your application as it was recommended here.

Is your platform Linux?

You might be experiencing the issue discussed below which was tracked as Importing the numpy C-extensions failed. [slicer 4.11.20200930, archlinux] · Issue #5474 · Slicer/Slicer · GitHub and fixed in mid-March 2021 (after the Slicer 4.11.20210226 release).

Thank you both. Yes, we are on linux, I will check this, it looks interesting!! I let you know.
Pierre