Closed Gabriele111 closed 6 months ago
ps. python version i used is the 3.9.18 since then i need to use sofa_env for RL which requires python >= 3.9
Hi @hugtalbot,
do you have any suggestion about this topic?
thank you!
Indeed, when compiled, SofaPython3 is not included in the automatically-loaded list of plugins.
But you can load the plugin at run-time using command-line arguments:
runSofa -l SofaPython3 <yousceneinpython.py>
Hi @fredroy, thank you for your reply. I tried as you suggested but i got this error:
' [ERROR] [DAGSimulation(Simulation)] Cannot load file 'C:\Users\gfurn\Downloads\liver.py': extension (py) is only supported if the plugin SofaPython3 is loaded. SofaPython3 must be loaded first before being able to load the file. '
This is weird, this should not happen if the plugin was loaded (i.e thanks to "-l SofaPython3"on the command line) Can you post the entire log when you execute runSofa ?
Hi @fredroy. Here it is:
[INFO] [runSofa] PluginRepository paths = C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/plugins;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/collections;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release [INFO] [runSofa] DataRepository paths = C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/src/share;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/src/examples;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build [INFO] [runSofa] GuiDataRepository paths = C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/src/applications/projects/runSofa/resources;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/src/Sofa/GUI/Qt/src/sofa/gui/qt/resources;C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build [INFO] [BaseGUI] Created directory: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/config [INFO] [BaseGUI] Created directory: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/screenshots [INFO] [GUIManager] Registered batch as a GUI. [INFO] [runSofa] Loading automatically plugin list in C:\Users\gfurn\anaconda3\envs\sofa_source\sofa\build\bin\Release/plugin_list.conf.default [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.ODESolver.Forward.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.ODESolver.Backward.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.ODESolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.IO.Mesh.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.IO.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Playback.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SceneUtility.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Container.Constant.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Container.Dynamic.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Container.Grid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Container.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Mapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.Utility.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Topology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Visual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.LinearSystem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.LinearSolver.Iterative.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.LinearSolver.Direct.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.LinearSolver.Preconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.LinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Mass.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Diffusion.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Mapping.Linear.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Mapping.NonLinear.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Mapping.MappedMatrix.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Mapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.StateContainer.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.Spring.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.FEM.Elastic.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.FEM.HyperElastic.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.FEM.NonUniform.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.FEM.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.TensorMass.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.SolidMechanics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.Lagrangian.Model.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.Lagrangian.Correction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.Lagrangian.Solver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.Lagrangian.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.Projective.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Constraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.AnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.MechanicalLoad.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Geometry.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Detection.Algorithm.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Detection.Intersection.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Detection.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Response.Mapper.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Response.Contact.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.Response.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Collision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Setting.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Controller.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Engine.Analyze.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Engine.Generate.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Engine.Select.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Engine.Transform.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Engine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.Haptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.Component.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GL.Component.Rendering2D.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GL.Component.Rendering3D.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GL.Component.Engine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GL.Component.Shader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GL.Component.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GUI.Component.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GUI.Batch.dll [INFO] [GUIManager] Registered qglviewer as a GUI. [INFO] [GUIManager] Registered qt as a GUI. [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/Sofa.GUI.Qt.dll [DEPRECATED] [SofaValidation] SofaValidation is deprecated. It will be removed at v23.06. For CompareState and CompareTopology, use Sofa.Component.Playback instead. [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/SceneCreator.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/ArticulatedSystemPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/bin/Release/SofaMatrix.dll [INFO] [PluginManager] 72 plugins have been loaded from C:\Users\gfurn\anaconda3\envs\sofa_source\sofa\build\bin\Release/plugin_list.conf.default [INFO] [GUIManager] lastUsedGUI.ini not found; using default GUI. [INFO] [SofaPluginManager] Loading automatically plugin list in C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/config/loadedPlugins.ini [INFO] [PluginManager] 0 plugins have been loaded from C:/Users/gfurn/anaconda3/envs/sofa_source/sofa/build/config/loadedPlugins.ini
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root".
It looks like it never tried to load SofaPython3 (even with the flag I told you) which is really weird.
Last thing you can try is edit the file C:\Users\gfurn\anaconda3\envs\sofa_source\sofa\build\bin\Release/plugin_list.conf.default
and add SofaPython3
inside
Hi @fredroy, i tried as you said but i didn't work either. I actually solved it running 'runSofa.exe -l SofaPython3' from anaconda promt (instead of windows cmd promt) and it loads SofaPython3 correctly.
Now i have an other little problem: when i open a python file it is not possible to import Sofa.Helper, Sofa.Core, Sofa.Types and others.
Hi, tried to run a .py file using above commands, but getting error saying the Sofapython3.dll file cannot be loaded as the specified module cannot be found
Hey @Gabriele111 better use our "Discussions" area on GitHub for questions/support I close this issue
Hello everyone,
i'm new to SOFA. I built succesfully SOFA from source on windows 11. Using cmake-gui, i selected plugin_sofapython3 to be added. the configuration and compilation went good, without any errors, but when i check the plugins list sofapython3 is not there and, after running runSofa, i cannot open a python scene in sofa.
Does someone have any ideas why this happens?
thank you very much!