Hi all,
I’ve been trying to use the Python Cubit API in a Jupyter Notebook to write interactive tutorials for trainees. I am working on a Ubuntu 20.04 machine and Cubit 2023.11 is installed, and importing Cubit in a Python script or in a Python terminal works fine.
When trying to import Cubit in a Jupyter notebook I get the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import cubit
File /opt/Coreform-Cubit-2023.11/bin/cubit.py:44
42 from cubit2 import *
43 else:
---> 44 from cubit3 import *
File /opt/Coreform-Cubit-2023.11/bin/cubit3.py:12
10 from . import _cubit3
11 else:
---> 12 import _cubit3
14 try:
15 import builtins as __builtin__
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/Coreform-Cubit-2023.11/bin/libcubit_util.so)
I checked the shared libraries that the Cubit .so file depends from the notebook on and everything seems fine and the paths are correctly found, so I don’t think it’s an environment variable related issue.
Could it be that Jupyter relies on the system-wide installation of libstdc++
and cubit tries to use it instead of the specific /opt/Coreform-Cubit-2023.11/bin/./libstdc++.so.6
, causing a version issue with GLIBCXX ?
Has anyone tried importing Cubit in a jupyter notebook before? Any feedback would be very welcome!
Thanks,
Nicolas