I have a Python VTK app working on Linux. I am trying to use pyinstaller to package the app for distribution. Once the app is packaged, I got this error:
2025-12-31 08:42:19.054 ( 2.472s) [ 70800EFF9080]vtkXOpenGLRenderWindow.:284 ERR| vtkXOpenGLRenderWindow (0x40ac1f00): Could not find a decent config
2025-12-31 08:42:19.054 ( 2.472s) [ 70800EFF9080]vtkXOpenGLRenderWindow.:540 WARN| vtkXOpenGLRenderWindow (0x40ac1f00): Could not find a decent visual
2025-12-31 08:42:19.062 ( 2.480s) [ 70800EFF9080] vtkEGLRenderWindow.cxx:391 WARN| vtkEGLRenderWindow (0x40a4eb20): Setting an EGL display to device index: -1 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions
2025-12-31 08:42:19.062 ( 2.480s) [ 70800EFF9080] vtkEGLRenderWindow.cxx:396 WARN| vtkEGLRenderWindow (0x40a4eb20): Attempting to use EGL_DEFAULT_DISPLAY…
2025-12-31 08:42:19.062 ( 2.480s) [ 70800EFF9080] vtkEGLRenderWindow.cxx:401 WARN| vtkEGLRenderWindow (0x40a4eb20): Could not initialize a device. Exiting…
2025-12-31 08:42:19.062 ( 2.480s) [ 70800EFF9080]vtkOpenGLRenderWindow.c:920 WARN| vtkEGLRenderWindow (0x40a4eb20): Failed to initialize OpenGL functions!
2025-12-31 08:42:19.062 ( 2.480s) [ 70800EFF9080]vtkOpenGLRenderWindow.c:939 WARN| vtkEGLRenderWindow (0x40a4eb20): 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-12-31 08:42:19.063 ( 2.481s) [ 70800EFF9080]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.
After testing on several laptops (all under Ubuntu 24.04), here is the information I know:
Executing the python vtk app directly works.
Executing the pyinstaller exe works on some laptops but not all. I do not find the relation between the ones that are ok and the ones that are not.
I tried to package the pyinstaller app with and without libx11.so but it has no impact on the result.
Do you have an idea of what is happening or another test to run?
If I run the pyinstaller packaging on an Ubuntu 24.04 and then run the package it works on all the machines (maybe because they all are on Ubuntu 24.04…)
But if I package on something else than Ubuntu 24.04 (like 22.04, or debian bullseye), the package fails to execute.
Here is a glxinfo on a machine where the pyinstaller package does not work. As a reminder, the python source package does works on every machines, only the pyinstaller does not.
Indeed, current workaround is to use Ubuntu 24.04. However, I would like to deploy also on Ubuntu 22.04, so packaging on 24.04 is not a long term solution.
From your response, you seem to say the issue might be on pyinstaller side?