importing Sofa in python environment #4002
Replies: 4 comments
-
Ciao @AliceCatalano Firstly , you can already enjoy the newly released v23.06 : https://www.sofa-framework.org/download/ Else, regarding the setting up of SOFA in your python environement, you need to make sure that python knows where to find SOFA. To do, environment variables must be set as follows: For Ubuntu, run in a terminal: export SOFA_ROOT=/path/to/SOFA_install
export PYTHONPATH=/path/to/SofaPython3/lib/python3/site-packages:$PYTHONPATH Once these two variables are set, you can check if it works by running : python3
import Sofa This was available on the SP3 doc (which is not straightforward to find ..) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to adapt an old sofa python code to the new Sofa v22.12 on the latest ubuntu.
I am using python3.8 as programming environment and i have an error on the
import Sofa
The Module is not recognized by the python environment (I installed pybind11). Reading on the forums I tried to install Sofa as:
pip3 install Sofa
and I get an error during the installation on the pyDNS. At this point I tried to install the different versions of the pyDNS, but yet once i run again the command the result doesn't change.
I have this problem on a python crontroller code, while the .pyscn works perfectly
Beta Was this translation helpful? Give feedback.
All reactions