- This topic has 4 replies, 3 voices, and was last updated 6 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] Adding SOFA module to Spyder
Tagged: 64_bits, Linux_ubuntu, SOFA_1706
Hi,
Where is the library of SOFA? How can I add it to Spyder path so that I can run the sofa python script in Spyder and evaluate it line to line? I import SOFA in the script but when I run the file in Spyder it gives me ImportError: No module named Sofa
Zahra
The core of this plugin is the Sofa Python module available to python scripts from within the SofaPython components (they are not available outside Sofa environment, in the command-line python binary for example).
Hi @zahra,
As @egarcm mentioned, you can first find documentation online.
Moreover, I would advise you to have a look at the SOFA examples in sofa/applications/plugins/SofaPython/examples/ (especially the EmptyController.py).
Note that these scripts can only be run using the executable runSofa but not in a classical Python environment.
Developers of the community are currently working on this new version of SOFA, fully usable in classical Python environments like Spyder.
Best,
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.