As indicated in the title, with @josephmure we have created a Python model, which needs to import an external Python library. To do this, we had to set manually the path in the Python script defining the model, by adding the following lines:
import sys
sys.path.append("/home/H01971/MAGIC/incendie-inversion/wrapper")
import persalys_otmagic as otm
Hence, anyone else wanting to reproduce our study will have to manually change the path inside Persalys Python model window. We would like to know if there exist more intelligent / automatic way to set paths for Persalys.
That would indeed be the way to go, at least with the linux AppImage. You could also run pip in perslays python console to install a module directly from a repository. For example:
import pip
pip.main(["install", "salome-med"])
import med
The windows approach is simpler though. You can directly paste your module in persalys install directory’s site-package