I am trying to use the meshing software Salome with Python. As i want to use a solely automated script for meshing of a simple geometry, i need the salome API.
Salome is so far installes on a laptop with Ubuntu 22.04. and is running. However if i try to use one of the tutorial scripts in vscode i am only presented with:
ModuleNotFoundError: No module named ‘salome’
How can i resolve this?
2
Answers
The issue can be resolved by opening the terminal navigating to the salome directory and running the command
immediately after that start VScode with
VScode now can import the salome packages and execute programms. This works for Ubuntu.
Select the correct interpreter (Ctrl+Shift+P –>
Python: Select Interpreter
)Executes the code with the Python extension (
Run Python File
).