This is the first time I use python to run vtk. I got the following errors when the code ran to the following line.
renderWindow = vtkRenderWindow()
The error message is,
2025-08-22 11:11:25.167 ( 0.546s) [ 75B0D0CF9740]vtkXOpenGLRenderWindow.:221 ERR| vtkXOpenGLRenderWindow (0x1d048ca0): Could not find a decent config
2025-08-22 11:11:25.167 ( 0.546s) [ 75B0D0CF9740]vtkXOpenGLRenderWindow.:447 WARN| vtkXOpenGLRenderWindow (0x1d048ca0): Could not find a decent visual
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740] vtkEGLRenderWindow.cxx:385 WARN| vtkEGLRenderWindow (0x1d044580): Setting an EGL display to device index: -1 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740] vtkEGLRenderWindow.cxx:390 WARN| vtkEGLRenderWindow (0x1d044580): Attempting to use EGL_DEFAULT_DISPLAY...
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740] vtkEGLRenderWindow.cxx:395 WARN| vtkEGLRenderWindow (0x1d044580): Could not initialize a device. Exiting...
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740]vtkOpenGLRenderWindow.c:794 WARN| vtkEGLRenderWindow (0x1d044580): Failed to initialize OpenGL functions!
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740]vtkOpenGLRenderWindow.c:813 WARN| vtkEGLRenderWindow (0x1d044580): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
2025-08-22 11:11:25.170 ( 0.550s) [ 75B0D0CF9740]vtkOSOpenGLRenderWindow:152 WARN| libOSMesa not found. It appears that OSMesa is not installed in your system. Please install the OSMesa library from your distribution's package manager.
This is ubuntu 24.04.2 LTS desktop. I can run vtk.js with no problem.
I check OpenGL with the following command.
glxinfo | grep "OpenGL renderer"
The result is,
OpenGL renderer string: Mesa Intel(R) HD Graphics 4000 (IVB GT2)
And, glxgears works.
Thanks in advance for helps.
Kind regards,
Charles