Help running salome 9.13 in tuxedOS 4

Hello,
I need help running salome in my personal PC. I am using tuxedOS which is ubuntu based, and with the last upgrade of tuxedo, they rebased in 24.04.1 LTS (before it was based on 22.04.4) before the upgrade salome 9.13 universal was working correctly, with mesa_salome and salome. the ubuntu version was not working as I was in a wayland session.
since the transition to tuxedos 4 (so from 22.04.4 to 24.04.1) salome universal stoped working:
I am getting the following error:

Traceback (most recent call last):
  File "/home/franco/Programs/Salome/SALOME-9.13.0/./mesa_salome", line 77, in main
    from salomeContext import SalomeContext, SalomeContextException
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/KERNEL/bin/salome/salomeContext.py", line 26, in <module>
    from parseConfigFile import parseConfigFile
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py", line 49, in <module>
    class MultiOptSafeConfigParser(configparser.SafeConfigParser):
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/franco/Programs/Salome/SALOME-9.13.0/./mesa_salome", line 1351, in <module>
    main(args)
  File "/home/franco/Programs/Salome/SALOME-9.13.0/./mesa_salome", line 1343, in main
    except SalomeContextException as e:
           ^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'SalomeContextException' where it is not associated with a value

here is the classical info that it has been asked in the forum before. I really need to make it work as it is the only PC I have at hand.

from distro import linux_distribution
print(linux_distribution())
('TUXEDO OS', '24.04', 'noble')
cat /etc/os-release
NAME="TUXEDO OS"
VERSION="24.04.1 LTS"
ID=tuxedo
ID_LIKE="ubuntu debian"
PRETTY_NAME="TUXEDO OS"
VERSION_ID="24.04"
HOME_URL="https://tuxedocomputers.com/"
SUPPORT_URL="https://support.tuxedocomputers.com/"
BUG_REPORT_URL="https://gitlab.com/tuxedocomputers/development/tuxedo_os/os"
PRIVACY_POLICY_URL="https://www.tuxedocomputers.com/en/Privacy-policy.tuxedo"
VERSION_CODENAME=noble
UBUNTU_CODENAME=noble

If I try with the ubuntu 24 version I get (with mesa_salome and salome)
SALOME_Session_Server_No_Server: error while loading shared libraries: libgdal.so.34: cannot open shared object file: No such file or directory

for universal binary, use run_salome.sh to ensure it uses the embedded python instead of the system one to bootstrap SALOME.

Concerning the missing library, you need to install libgdal34t64:

apt-file find /usr/lib/*/libgdal.so.34
libgdal34t64: /usr/lib/x86_64-linux-gnu/libgdal.so.34
1 Like

hello nabil,
thanks for the reply, I will get back to you when I get home and test tonight

It is an issue with Python 3.12 where configparser.SafeConfigParser has been removed since it was deprectade since 3.2.
You can replace it with configparser.ConfigParser in the 2 parserConfigFile.py one in KERNEL and one in SALOME idrectories.

1 Like

This proven to solve the issue thanks a lot.

hello nabil,
JFYI
apt-file find /usr/lib/*/libgdal.so.34
did not had any output at all.
and libgdal34t64: /usr/lib/x86_64-linux-gnu/libgdal.so.34
had as output libgdal34t64:: command not found

sudo apt install libpq-dev gdal-bin libgdal-dev

proved to installed the ‘missing’ libraries nevertheless the ubuntu version, at least for me in my PC, proven to still not work in wayland sessions
with an exit error once one enters to GEOM SMESH SHAPER etc:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0xe
  Serial number of failed request:  29
  Current serial number in output stream:  30

Hello nabil,
when I use run_salome.sh (or salome or mesa_salome) with the universal,
I can not use meshio.
I get that meshio is not installed and in the terminal this error:

./run_salome.sh 
Traceback (most recent call last):
  File "/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/meshio/lib/python3.9/site-packages/bin/meshio", line 5, in <module>
    from meshio._cli import main
ImportError: cannot import name 'main' from 'meshio._cli' (/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9/site-packages/meshio/_cli/__init__.py)

any idea?

Hi Franco,
thanks for your feedback. Please share output of:

  • PATH
  • LD_LIBRARY_PATH
  • PYTHONPATH
    before you launch run_salome.sh and also what you do exactly once SALOME is started, i.e. some kind of reproducer.

Thanks.

Hello nabil,
could you be more precise about the output of…
if you mean the values of this variables:

echo $PATH
/usr/local/texlive/2024/bin/x86_64-linux:/usr/lib/x86_64-linux-gnu/openmpi/bin:/home/franco/OpenFOAM/franco-v2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/site/2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/bin:/usr/lib/openfoam/openfoam2312/wmake:/usr/local/texlive/2024/bin/x86_64-linux:/home/franco/.local/bin:/home/franco/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
~/Programs/Salome/SALOME-9.13.0 
# echo $LD_LIBRARY_PATH
/home/franco/OpenFOAM/franco-v2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/openfoam/openfoam2312/site/2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/sys-openmpi:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/coin-or/lib
 ~/Programs/Salome/SALOME-9.13.0 
# echo $PYTHONPATH

if not, I not sure.
if I run source ./env_launch.sh before:

echo $PATH
/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cmake/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYCALCULATOR/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CALCULATOR/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/zeromq/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/OPENTURNS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/include:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/meshio/lib/python3.9/site-packages/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/meshio/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/COMPONENT/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACSGEN/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/mmg/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/URANIE/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/root/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/DOCUMENTATION/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/NETGENPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HexoticPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GMSHPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GHS3DPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/BLSURFPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/JOBMANAGER/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HOMARD/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HELLO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HYBRIDPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/TTK/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOME/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYHELLO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCKPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/netgen/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/packagespy/packagespy/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCK/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/tcl/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/TopIIVolMesh/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPERSTUDY/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPER/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GEOM/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FIELDS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/opencv/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/C3PO/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/C3PO:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MEDCOUPLING/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/medfile/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MeshGems/bin/Linux_64:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MeshGems/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PERSALYS/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YDEFX/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/pmml/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GUI/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/graphviz/include/graphviz:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/graphviz/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/swig/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/include/paraview-5.11:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openturns/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FMILibrary/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cminpack/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PyQt/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/sip/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/qt/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/KERNEL/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CAS/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CAS:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/freeimage/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/freetype/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cppunit/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/omniORB/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/Scripts:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/boost/include:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gdal/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/netcdf/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/libxml2/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ispc/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cgns/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/hdf5/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openmpi/include:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openmpi/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python:/usr/local/texlive/2024/bin/x86_64-linux:/usr/lib/x86_64-linux-gnu/openmpi/bin:/home/franco/OpenFOAM/franco-v2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/site/2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin:/usr/lib/openfoam/openfoam2312/bin:/usr/lib/openfoam/openfoam2312/wmake:/usr/local/texlive/2024/bin/x86_64-linux:/home/franco/.local/bin:/home/franco/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gmsh/bin
~/Programs/Salome/SALOME-9.13.0 
# echo $LD_LIBRARY_PATH
/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYCALCULATOR/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CALCULATOR/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/zeromq/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/OPENTURNS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/petsc/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/COMPONENT/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/URANIE/JSONCPP/jsoncpp-0.10.5/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/URANIE/OPT++/optpp-2.4/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/URANIE/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/root/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/DOCUMENTATION/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/NETGENPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HexoticPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GMSHPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gmsh/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GHS3DPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/BLSURFPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/JOBMANAGER/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HOMARD/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HELLO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HYBRIDPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/TTK/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOME/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYHELLO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCKPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/netgen/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCK/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/tcl/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPERSTUDY/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPER/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/planegcs/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GEOM/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FIELDS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/opencv/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MEDCOUPLING/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/medfile/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MeshGems/lib/Linux_64:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PERSALYS/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YDEFX/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PY2CPP/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/pmml/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GUI/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/graphviz/lib/graphviz:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/graphviz/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib/paraview-5.11:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/catalyst/lib/catalyst:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/catalyst/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openturns/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FMILibrary/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cminpack/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ospray/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openVKL/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/rkCommon/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/embree/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/qwt/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PyQt:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/sip/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/qt/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/KERNEL/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CAS/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/freeimage/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/freetype/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/LIBBATCH/lib/python3.9:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/LIBBATCH/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cppunit/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/omniORB/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/boost/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gdal/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/netcdf/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/libxml2/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/nlopt/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/tbb/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/cgns/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/hdf5/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openmpi/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/lapack/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/system_dep:/home/franco/OpenFOAM/franco-v2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/openfoam/openfoam2312/site/2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/sys-openmpi:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/coin-or/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Accas:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Aide:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/convert:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Doc:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Editeur:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Efi2Xsd:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Extensions:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/generator:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Ihm:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/InterfaceQT4:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Noyau:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Telemac:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Traducteur:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/UiQT5
~/Programs/Salome/SALOME-9.13.0 
# echo $PYTHONPATH
/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/mmgplugin/plugins:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYCALCULATOR/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYCALCULATOR/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYCALCULATOR/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CALCULATOR/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CALCULATOR/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/CALCULATOR/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVISADDONS/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/OPENTURNS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/OPENTURNS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/OPENTURNS/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin/cdmath/postprocessing:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin/cdmath:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib/cdmath:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin/coreflows:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib/coreflows:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SOLVERLAB/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/petsc/lib/slepc4py/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/petsc/lib/slepc4py:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/petsc/lib/petsc4py/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/petsc/lib/petsc4py:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/meshio/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/COMPONENT/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/COMPONENT/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/COMPONENT/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACSGEN/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACSGEN/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/URANIE/lib/python:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/root/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/DOCUMENTATION/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/DOCUMENTATION/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/DOCUMENTATION/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/NETGENPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/NETGENPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/NETGENPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HexoticPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HexoticPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HexoticPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GMSHPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GMSHPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GMSHPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gmsh/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GHS3DPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GHS3DPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GHS3DPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/BLSURFPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/BLSURFPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/BLSURFPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/JOBMANAGER/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/JOBMANAGER/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/JOBMANAGER/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HOMARD/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HOMARD/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HOMARD/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HELLO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HELLO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HELLO/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HYBRIDPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HYBRIDPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HYBRIDPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/TTK/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOME/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOME/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOME/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYHELLO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYHELLO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PYHELLO/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCKPLUGIN/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCKPLUGIN/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCKPLUGIN/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/packagespy/packagespy:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCK/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCK/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/HEXABLOCK/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO_INTERFACE/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PARAVIS/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPERSTUDY/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPERSTUDY/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPERSTUDY/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPER/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPER/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SHAPER/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GEOM/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GEOM/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GEOM/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FIELDS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FIELDS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/FIELDS/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/opencv/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/C3PO/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/mpi4py/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MEDCOUPLING/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MEDCOUPLING/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/MEDCOUPLING/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/medfile/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PERSALYS/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YDEFX/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YDEFX/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YDEFX/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ADAO/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/YACS/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/pmml/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/pmml/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GUI/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GUI/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/GUI/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib/paraview-5.11:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib/paraview-5.11/site-packages/vtk:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/ParaView/lib/paraview-5.11/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/openturns/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PyFMI/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PyQt/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/PyQt:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/sip/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/KERNEL/bin/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/KERNEL/lib/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/KERNEL/lib/python3.9/site-packages/salome:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SALOMEBOOTSTRAP/__SALOME_BOOTSTRAP__:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/omniORB/lib64/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/omniORB/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/omniORB/lib:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/gdal/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/libxml2/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/nlopt/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/bin:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9/site-packages:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9::/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Accas:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Aide:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/convert:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Doc:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Editeur:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Efi2Xsd:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Extensions:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/generator:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Ihm:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/InterfaceQT4:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Noyau:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Telemac:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/Traducteur:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/UiQT5:/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/EFICAS_TOOLS/lib/python3.9/site-packages/salome

for the terminal I run run_salome.sh
I go to mesh, import mesh import with meshio and I get the error message that it is not installed.

I just gave it a try and it works fine (meshed a box and exported it to msh with meshio)
It may well be that in the end you do have some conflicts in PATH environment variable given that LD_LIBRARY_PATH and PYTHONPATH are set in the script.

Can you check whether setting:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

helps.

still same issue (i was trying to import a mesh with meshio):

this is weird. Can you retry with:

unset LD_LIBRARY_PATH
unset PYTHONPATH
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
./run_salome.sh

still same error message and output in the terminal

To ensure you’re calling the right meshio:

 ./run_salome.sh context
python
import meshio
print(meshio.__file__)
print(meshio._cli.__file__)
from meshio._cli import main

It should return embedded files in SALOME 9.13

SALOME-9.13.0> ./run_salome.sh context
***
*** SALOME context has already been set.
*** Enter 'exit' (only once!) to leave SALOME context.
***
SALOME-9.13.0> python
Python 3.9.14 (main, Aug  2 2024, 19:47:41) 
[GCC 8.3.1 20190311 (Red Hat 8.3.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import meshio
>>> print(meshio._cli.__file__)
SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/_cli/__init__.py

In principle this file should be present in:


SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/_cli/_main.py

If it fails, then you can put all previous commands in a file called bla.py

import meshio
print(meshio.__file__)
print(meshio._cli.__file__)
from meshio._cli import main

and run:

 python  -m trace --trace ./bla.py

if it still fails, maybe some SALOME developer can comment further, since I don’t see what could be wrong.

well, i get an error already when I run simply python:

 ~/Programs/Salome/SALOME-9.13.0 
#  ./run_salome.sh context
***
*** SALOME context is now set.
*** Enter 'exit' (only once!) to leave SALOME context.
***
 ~/Programs/Salome/SALOME-9.13.0 
# python
python: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory

also if I run the python commands on the python console inside a salome already opened it gives the same error:

from meshio._cli import main
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name 'main' from 'meshio._cli' (/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9/site-packages/meshio/_cli/__init__.py)

salut nabil,
at least is it possible to import a mesh using a python script?
from the doc I tried:
smesh.CreateMeshesFromMESHIO(pathToMesh)
which gives the following error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/franco/centralesupelec/scripts/porousMedia.py", line 12, in <module>
    Mesh=smesh.CreateMeshesFromMESHIO('/home/franco/Downloads/test/mesh_rem_p0_123_quadrangulation_smooth.obj')
  File "/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/lib/python3.9/site-packages/salome/salome/smesh/smeshBuilder.py", line 753, in CreateMeshesFromMESHIO
    aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromMESHIO(self, theFileName)
  File "/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/SMESH/lib/python3.9/site-packages/salome/SMESH_Gen_idl.py", line 436, in CreateMeshesFromMESHIO
    return self._obj.invoke("CreateMeshesFromMESHIO", _0_SMESH.SMESH_Gen._d_CreateMeshesFromMESHIO, args)
SALOME.SALOME_Exception: SALOME.SALOME_Exception(details=SALOME.ExceptionStruct(type=BAD_PARAM, text='MESHIO\nFailed system("meshio convert  /home/franco/Downloads/test/mesh_rem_p0_123_quadrangulation_smooth.obj /tmp/879980/mesh_rem_p0_123_quadrangulation_smooth.med 2> /tmp/879984158625_/meshio_errors.txt").\n\nTraceback (most recent call last):\n  File "/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/meshio/lib/python3.9/site-packages/bin/meshio", line 5, in <module>\n    from meshio._cli import main\nImportError: cannot import name \'main\' from \'meshio._cli\' (/home/franco/Programs/Salome/SALOME-9.13.0/INSTALL/Python/lib/python3.9/site-packages/meshio/_cli/__init__.py)\n\nOperation canceled.', sourceFile='', lineNumber=4294967295))

if in the python terminal I do:

import meshio
meshioMesh=meshio.read(pathToMesh)

this works, but I am missing how to transform the meshioMesh into a salome Mesh object

There is indeed one test in SMESH which uses CreateMeshesFromMESHIO. Have a look at this file:


SALOME-9.13.0/BINARIES-CO7/SMESH/bin/salome/test/other/SMESH_MeshioShapes.py

I just tested it in command line and interactively and it’s OK:


SALOME-9.13.0/run_salome.sh test -R SMESH_MeshioShapes
/xxxxx/SALOME-9.13.0/BINARIES-CO7/SALOME/bin/salome/test
    Start 1719: SMESH_SMESH_MeshioShapes
1/1 Test #1719: SMESH_SMESH_MeshioShapes .........   Passed   30.13 sec

100% tests passed, 0 tests failed out of 1

Label Time Summary:
SMESH          =  30.13 sec*proc (1 test)
SMESH_tests    =  30.13 sec*proc (1 test)

Total Test time (real) =  30.16 sec

hello nabil,
I just tested in my other PC, here it works, I not sure the issue in the other PC, as it is same os and same installation.
in anycase, meshio is failing to export obj file.
here is the message I tried to export a plane meshed in netgen 2D-1D


MESHIO
Failed system("meshio convert  /tmp/294940/test.med /home/franco/Desktop/test.obj 2> /tmp/294948128_/meshio_errors.txt").

Traceback (most recent call last):
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/bin/meshio", line 8, in <module>
    sys.exit(main())
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/_cli/_main.py", line 52, in main
    return args.func(args)
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/_cli/_convert.py", line 75, in convert
    write(args.outfile, mesh, **kwargs)
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/_helpers.py", line 188, in write
    return writer(filename, mesh, **kwargs)
  File "/home/franco/Programs/Salome/SALOME-9.13.0/BINARIES-CO7/meshio/lib/python3.9/site-packages/meshio/obj/_obj.py", line 105, in write
    raise WriteError(
meshio._exceptions.WriteError: Wavefront .obj files can only contain triangle or quad cells.

Operation canceled.

the mesh only contained triangles/quads and edges (I removed the edges in case that it was the problem but it remained)

I could reproduce the issue with latest MeshIO. If one meshes a plane, exports it as a MED and converts it to OBJ file format, it simply fails with the reported error message.

Here, one needs to modify the constructed 2D mesh and remove the edges on the four borders. This can be done as follows: Main menu bar → Modifications → Remove Elements → Set Filter → Edges → Entity type == SEG2.

Another approach is simply replacing in the _obj.py writer:

    for c in mesh.cells:
        if c.type not in ["triangle", "quad", "polygon"]:
            raise WriteError(
                "Wavefront .obj files can only contain triangle or quad cells."
            )

with:

    for c in mesh.cells:
        if c.type not in ["triangle", "quad", "polygon"]:
            print("WARNING: skipping {}. Wavefront .obj files can only contain triangle or quad cells.".format(c.type)
            )

Then, strangely, the nodes which constitute the triangles do not have a z coordinate, in case the plane is at z=0. If the plane is at a given height, it’s fine.

:arrow_right: yet another bug about spacial dimensions, surely in _med.py or _mesh.py which needs to be investigated further.

Here again, one can fix it programmatically as follows in _obj.py:

        for p in mesh.points:
            f.write(f"v {p[0]} {p[1]} {p[2]}\n")

is replaced with:

        for p in mesh.points:
            p=p.tolist()
            if len(p) == 2:
                p.append(0.)
            f.write(f"v {p[0]} {p[1]} {p[2]}\n")

The generated OBJ can then be reloaded in SMESH.

Frankly speaking, it smelIs like a bug which we will discuss with @cbourcier first and raise to the MeshIO developer.

Thanks for reporting about this issue. And again, thanks for helping others!

Regards.

Modified OBJ file format handler in MeshIO: _obj.py (4.3 KB)
Generated OBJ file format mesh: Mesh_1.obj (4.2 KB)

1 Like