Help with Integration of External Python Libraries in Salome

Hello everyone,

I am currently working with Salome for a simulation project, and I am facing some difficulties when trying to integrate external Python libraries into my Salome environment. I am hoping to get some guidance from the community.

Specifically, I am trying to use a few third-party libraries (such as NumPy, SciPy, and Matplotlib) to enhance my simulations and post-processing tasks. While I have been able to install these libraries successfully in my base Python environment, I am unsure about how to link them to the Python environment used by Salome.

I have tried the following steps:

  1. Installed the libraries using pip in my system Python.
  2. Verified that they are accessible in a standard Python script outside of Salome.
  3. Attempted to use sys.path.append() within the Salome Python console to point to the directory where the libraries are installed.

However, despite these efforts, Salome doesn’t seem to recognize the libraries when I attempt to import them within the Salome Python environment.

Has anyone faced a similar issue or can suggest the correct approach to integrate additional Python libraries into the Salome platform? Additionally, if there is any documentation or resources specific to this task, I would greatly appreciate it if you could point me in the right direction.

I also checked this: https://discourse.salome-platform.org/t/external-openfoam-python-script-not-running-after-update-to-salome-9-9/ruby

Thank you in advance for any assistance or suggestions!

In order to get some help by SALOME community, can you tell which version of SALOME you’re running (ubuntu , debian, universal binary, or Windows) and which library you are trying to use in SALOME environment?
In principle, Python packages like Numpy, Scipy and Matplotlib are already integrated. Additional libraries are exposed in launcher.

Regards