You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Hello.
When I import
Sofa
in python, it works well withSOFA_v23.06.00_Linux
.However, with
SOFA_v23.12.00_Linux
, it doesn't work.I didn't forget adding
SofaPython3 NO_VERSION
inplugin_list.conf
.I also tried another python version, it shows another error.
How can I import
Sofa
withSOFA_v23.12.00_Linux
?Thank you.
The text was updated successfully, but these errors were encountered: