Trouble in SofaPython 3 binding #4052
-
Hi guys ! I would like to use SofaPython3 to make my Sofa scene communicate with a python script. I di dan in-tree build of SofaPython3 plugin but that was not sufficient to use Sofa in a python script (I am using VSCode). In the docs it is written to just do :
However, as you can see below I do not have any build rep in my SofaPython3 folder (nor inside the other folders). Do you have an idea why and how can I do the bindings to use Sofa in a python interpreter ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you made an in-tree compilation of sofaPython3 (using the cmake variable CMAKE_EXTERNAL_DIRECTORIES) the build files should be located in the sofa build directory itself. The library are located in the folder |
Beta Was this translation helpful? Give feedback.
If you made an in-tree compilation of sofaPython3 (using the cmake variable CMAKE_EXTERNAL_DIRECTORIES) the build files should be located in the sofa build directory itself. The library are located in the folder
$sofabuilddirectory$/lib/
.After locating your libraries path you could either install the libs by following the documentation, or you can add them to your python environment by setting your
PYTHONPATH
variable like this :export PYTHONPATH=$PYTHONPATH:path/to/your/compiled/lib