Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOFA_v23.06.00_Linux works, SOFA_v23.12.00_Linux doesn't work. No module named 'Sofa.Helper' #410

Open
KHJ273 opened this issue Apr 2, 2024 · 0 comments

Comments

@KHJ273
Copy link

KHJ273 commented Apr 2, 2024

Hello.
When I import Sofa in python, it works well with SOFA_v23.06.00_Linux.

(base) hojun@hojun-Z370M-D3H:~$ gedit ~/.bashrc
export SOFA_ROOT=/home/hojun/SOFA/SOFA_v23.06.00_Linux
export PYTHONPATH=/home/hojun/SOFA/SOFA_v23.06.00_Linux/plugins/SofaPython3/lib/python3/site-packages
export PYTHONPATH=/home/hojun/SOFA/SOFA_v23.06.00_Linux/plugins/STLIB/lib/python3/site-packages:$PYTHONPATH
export SOFA=/home/hojun/SOFA/SOFA_v23.06.00_Linux/bin/runSofa
alias runsofa="$SOFA"
(base) hojun@hojun-Z370M-D3H:~$ source ~/.bashrc
(sofagym) hojun@hojun-Z370M-D3H:~$ python
Python 3.8.18 (default, Sep 11 2023, 13:40:15) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sofa
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: /home/hojun/SOFA/SOFA_v23.06.00_Linux
---------------------------------------
>>> 

However, with SOFA_v23.12.00_Linux, it doesn't work.

(base) hojun@hojun-Z370M-D3H:~$ gedit ~/.bashrc
export SOFA_ROOT=/home/hojun/SOFA/SOFA_v23.12.00_Linux
export PYTHONPATH=/home/hojun/SOFA/SOFA_v23.12.00_Linux/plugins/SofaPython3/lib/python3/site-packages
export PYTHONPATH=/home/hojun/SOFA/SOFA_v23.12.00_Linux/plugins/STLIB/lib/python3/site-packages:$PYTHONPATH
export SOFA=/home/hojun/SOFA/SOFA_v23.12.00_Linux/bin/runSofa
alias runsofa="$SOFA"
(base) hojun@hojun-Z370M-D3H:~$ source ~/.bashrc
(sofagym) hojun@hojun-Z370M-D3H:~$ python
Python 3.8.18 (default, Sep 11 2023, 13:40:15) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sofa
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: /home/hojun/SOFA/SOFA_v23.12.00_Linux
---------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hojun/SOFA/SOFA_v23.12.00_Linux/plugins/SofaPython3/lib/python3/site-packages/Sofa/__init__.py", line 140, in <module>
    import Sofa.Helper
ModuleNotFoundError: No module named 'Sofa.Helper'
>>> 

I didn't forget adding SofaPython3 NO_VERSION in plugin_list.conf.

Sofa.Component.ODESolver.Forward 23.12.00
Sofa.Component.ODESolver.Backward 23.12.00
Sofa.Component.ODESolver 23.12.00
Sofa.Component.IO.Mesh 23.12.00
Sofa.Component.IO 23.12.00
Sofa.Component.Playback 23.12.00
Sofa.Component.SceneUtility 23.12.00
Sofa.Component.Topology.Container.Constant 23.12.00
Sofa.Component.Topology.Container.Dynamic 23.12.00
Sofa.Component.Topology.Container.Grid 23.12.00
Sofa.Component.Topology.Container 23.12.00
Sofa.Component.Topology.Mapping 23.12.00
Sofa.Component.Topology.Utility 23.12.00
Sofa.Component.Topology 23.12.00
Sofa.Component.Visual 23.12.00
Sofa.Component.LinearSystem 23.12.00
Sofa.Component.LinearSolver.Iterative 23.12.00
Sofa.Component.LinearSolver.Direct 23.12.00
Sofa.Component.LinearSolver.Preconditioner 23.12.00
Sofa.Component.LinearSolver 23.12.00
Sofa.Component.Mass 23.12.00
Sofa.Component.Diffusion 23.12.00
Sofa.Component.Mapping.Linear 23.12.00
Sofa.Component.Mapping.NonLinear 23.12.00
Sofa.Component.Mapping.MappedMatrix 23.12.00
Sofa.Component.Mapping 23.12.00
Sofa.Component.StateContainer 23.12.00
Sofa.Component.SolidMechanics.Spring 23.12.00
Sofa.Component.SolidMechanics.FEM.Elastic 23.12.00
Sofa.Component.SolidMechanics.FEM.HyperElastic 23.12.00
Sofa.Component.SolidMechanics.FEM.NonUniform 23.12.00
Sofa.Component.SolidMechanics.FEM 23.12.00
Sofa.Component.SolidMechanics.TensorMass 23.12.00
Sofa.Component.SolidMechanics 23.12.00
Sofa.Component.Constraint.Lagrangian.Model 23.12.00
Sofa.Component.Constraint.Lagrangian.Correction 23.12.00
Sofa.Component.Constraint.Lagrangian.Solver 23.12.00
Sofa.Component.Constraint.Lagrangian 23.12.00
Sofa.Component.Constraint.Projective 23.12.00
Sofa.Component.Constraint 23.12.00
Sofa.Component.AnimationLoop 23.12.00
Sofa.Component.MechanicalLoad 23.12.00
Sofa.Component.Collision.Geometry 23.12.00
Sofa.Component.Collision.Detection.Algorithm 23.12.00
Sofa.Component.Collision.Detection.Intersection 23.12.00
Sofa.Component.Collision.Detection 23.12.00
Sofa.Component.Collision.Response.Mapper 23.12.00
Sofa.Component.Collision.Response.Contact 23.12.00
Sofa.Component.Collision.Response 23.12.00
Sofa.Component.Collision 23.12.00
Sofa.Component.Setting 23.12.00
Sofa.Component.Controller 23.12.00
Sofa.Component.Engine.Analyze 23.12.00
Sofa.Component.Engine.Generate 23.12.00
Sofa.Component.Engine.Select 23.12.00
Sofa.Component.Engine.Transform 23.12.00
Sofa.Component.Engine 23.12.00
Sofa.Component.Haptics 23.12.00
Sofa.Component 23.12.00
Sofa.GL.Component.Rendering2D 23.12.00
Sofa.GL.Component.Rendering3D 23.12.00
Sofa.GL.Component.Engine 23.12.00
Sofa.GL.Component.Shader 23.12.00
Sofa.GL.Component 23.12.00
Sofa.GUI.Component 23.12.00
Sofa.GUI.Batch 23.12.00
Sofa.GUI.Qt 23.12.00
SofaValidation 23.12.00
SceneCreator 0.1
CImgPlugin 0.1
CGALPlugin 0.1
MeshSTEPLoader NO_VERSION
SofaMatrix 1.0
BeamAdapter 1.0
STLIB 3.0
SoftRobots 1.0
ShapeMatchingPlugin 23.12.00
CSparseSolvers 1.0
VolumetricRendering 23.12.00
SofaPython3 NO_VERSION

I also tried another python version, it shows another error.

(test) hojun@hojun-Z370M-D3H:~$ python
Python 3.10.14 (main, Mar 21 2024, 16:24:04) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sofa
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: /home/hojun/SOFA/SOFA_v23.12.00_Linux
---------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hojun/SOFA/SOFA_v23.12.00_Linux/plugins/SofaPython3/lib/python3/site-packages/Sofa/__init__.py", line 140, in <module>
    import Sofa.Helper
ImportError: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
>>> 

How can I import Sofa with SOFA_v23.12.00_Linux?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant