I follow the instructions here to generate a bpy wheel for Python installation.
Environment: Python 3.10 (blender 3.6 requires)
I am able to correctly install the wheel on my docker container and virtual environment on it.
Running "locally" on Docker through the terminal:
root@c8771baad61f:/# python3
Python 3.10.11 (main, Apr 5 2023, 14:15:10) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bpy
WARN (bgl): source/blender/python/generic/bgl.c:2654 BPyInit_bgl: 'bgl' imported without an OpenGL backend. Please update your add-ons to use the 'gpu' module. In Blender 4.0 'bgl' will be removed.
>>> print(bpy.app.version_string)
3.6.0 Alpha
Running on virtual environment on Docker through terminal:
(venv) root@1277ea4e3a7b:/# python3
Python 3.10.11 (main, Apr 5 2023, 14:15:10) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bpy
WARN (bgl): source/blender/python/generic/bgl.c:2654 BPyInit_bgl: 'bgl' imported without an OpenGL backend. Please update your add-ons to use the 'gpu' module. In Blender 4.0 'bgl' will be removed.
>>> print(bpy.app.version_string)
3.6.0 Alpha
Running through my application (in venv through jupyter):
File "test_blender.py", line 1, in <module>
import bpy
ImportError: /opt/venv/lib/python3.10/site-packages/bpy/lib/libusd_ms.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv
EDIT: on running this through jupyter:
os.system("python -c \"import bpy; print(bpy.app.version_string)\"")
import bpy
Line 1 works, but 2 returns the same error!
How do I fix this?
I would assume this is somehow related to GCC version issues, but why would it run correctly through the terminal then?
Thanks