# Python error vtkXOpenGLRenderWindow Could not find a decent config

**URL:** https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992
**Category:** Support
**Tags:** python
**Created:** [August 22, 2025, 6:47pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992 "2025-08-22T18:47:52Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![marpoleSim](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@marpoleSim](https://discourse.vtk.org/u/marpoleSim)
#### Post date: [August 22, 2025, 6:47pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/1 "2025-08-22T18:47:52Z")

</div>

This is the first time I use python to run vtk. I got the following errors when the code ran to the following line.

```auto
renderWindow = vtkRenderWindow()

```

The error message is,

```auto
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.

```auto
glxinfo | grep "OpenGL renderer"

```

The result is,

```auto
OpenGL renderer string: Mesa Intel(R) HD Graphics 4000 (IVB GT2)

```

And, glxgears works.

Thanks in advance for helps.

Kind regards,  
Charles

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [August 23, 2025, 3:54pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/2 "2025-08-23T15:54:58Z")

</div>

That seems like a strange place for VTK to fail. On X11, VTK does the following:

1. open an X11 display connection (succeeded)
2. load glx (succeeded)
3. find a usable glx framebuffer configuration (failed)
4. get a glx visual
5. create an OpenGL context

The most common places to see a failure are 1, 2, and 5. For systems with old graphics hardware, failure usually happens at 5 because the hardware doesn’t provide the needed OpenGL capabilities.

A failure at 3, as shown by your error printout, is strange. It means that VTK wasn’t able to find a usable framebuffer configuration (shown in the “GLXFBConfigs” section of the glxinfo printout). All that VTK requires at this stage is an rgba colorbuffer and a depth buffer. Perhaps no FBConfig with alpha exists on your system?

For debugging this problem, it’s best to create a `vtkXOpenGLRenderWindow` directly, rather than relying on VTK’s autodetection for the best window type:

```python
from vtkmodules.vtkRenderingOpenGL2 import vtkXOpenGLRenderWindow
import vtkmodules

print(vtkmodules. __version__ )
print(vtkmodules. __file__ )

win = vtkXOpenGLRenderWindow()
win.Render()
print(win.ReportCapabilities())

```

---

<div class="post-metadata">

### Author: ![marpoleSim](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@marpoleSim](https://discourse.vtk.org/u/marpoleSim)
#### Post date: [August 23, 2025, 5:03pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/3 "2025-08-23T17:03:15Z")

</div>

Thanks David,

I ran your code. It failed on line win.Render() with the following error.

```auto
9.4.1
/home/marpolesim/miniconda3/envs/DAC/lib/python3.10/site-packages/vtkmodules/ __init__.py
Segmentation fault (core dumped)

```

Is it possible that the cause is conda?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [August 23, 2025, 6:26pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/4 "2025-08-23T18:26:15Z")

</div>

Can you run the same commands interactively to find out which command causes the segfault?

I’m not sure if conda is the problem, the VTK that comes with conda is packaged by the conda folks and I’m not very familiar with it. The official vtk-python package (the one provided by the VTK developers) is the one on pypi that is installed via pip.

As a test, can you create a new environment and then install vtk with pip, to see if it behaves differently?

---

<div class="post-metadata">

### Author: ![marpoleSim](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@marpoleSim](https://discourse.vtk.org/u/marpoleSim)
#### Post date: [August 23, 2025, 8:12pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/5 "2025-08-23T20:12:38Z")

</div>

It works! I created a new environment and installed vtk with pip. I recalled I installed vtk with conda install in the previous environment.

In the previous environment, the command that caused the segfault is,

```auto
>>> from vtkmodules.vtkRenderingOpenGL2 import vtkXOpenGLRenderWindow
>>> import vtkmodules
>>> win = vtkXOpenGLRenderWindow()
>>> win.Render()
Segmentation fault (core dumped)

```

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [August 23, 2025, 10:04pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/6 "2025-08-23T22:04:37Z")

</div>

Glad to hear that it’s working.

Regarding the segfault, VTK will often print an error message before a segfault occurs, but in this case it seems that it didn’t.

Who knows why the conda package failed. My only guess is that there might have been a problem with the libraries that VTK finds on your system, maybe VTK was using one of the system-supplied libraries when it should have been using a conda-supplied library instead (libraries like libglvnd, libglx, libopengl, libglad). If you’re curious you can play around with the `ldd` command to see what libraries `libvtkRenderingOpenGL2-9.4.so` links to in your environment.

---

<div class="post-metadata">

### Author: ![AbrahamSV](https://discourse.vtk.org/user_avatar/discourse.vtk.org/abrahamsv/32/10567_2.png) [@AbrahamSV](https://discourse.vtk.org/u/AbrahamSV)
#### Post date: [March 18, 2026, 11:45am UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/7 "2026-03-18T11:45:12Z")

</div>

Hi there,

Sorry for reopening this, but I’m having a very similar issue.

I was trying to use some interactive plots from the [mne](https://mne.tools/stable/index.html) library, which use pyvista and therefore vtk.  
Then I bumped into that error:

( 25.970s) [7CDEE1360600]vtkXOpenGLRenderWindow.:286 ERR| vtkXOpenGLRenderWindow (0x151e12e0): Could not find a decent config

And my jupyter kernel crashed.

The interpreter I was using is a conda environment with python 3.12, where I installed all necessary packages via pip.

I then tried the solution in this post, and created a separate venv. I installed vtk there and, on a terminal, ran the basic test in this post, i.e.:

```auto
from vtkmodules.vtkRenderingOpenGL2 import vtkXOpenGLRenderWindow
import vtkmodules

print(vtkmodules.version)
9.6.0
print(vtkmodules.file)
/home/abraham-sanchez/Documents/pyvtk/lib/python3.12/site-packages/vtkmodules/init.py

win = vtkXOpenGLRenderWindow()
win.Render()
2026-03-18 11:34:50.752 ( 0.192s) [7244663E1600]vtkXOpenGLRenderWindow.:286 ERR| vtkXOpenGLRenderWindow (0x3848e1c0): Could not find a decent config

2026-03-18 11:34:50.752 ( 0.192s) [7244663E1600]vtkXOpenGLRenderWindow.:542 WARN| vtkXOpenGLRenderWindow (0x3848e1c0): Could not find a decent visual

2026-03-18 11:34:50.757 ( 0.197s) [7244663E1600]vtkXOpenGLRenderWindow.:286 ERR| vtkXOpenGLRenderWindow (0x3848e1c0): Could not find a decent config

2026-03-18 11:34:50.757 ( 0.197s) [7244663E1600]vtkXOpenGLRenderWindow.:542 WARN| vtkXOpenGLRenderWindow (0x3848e1c0): Could not find a decent visual

Segmentation fault (core dumped)

```

I have also played with the ldd comand:

`ldd pyvtk/lib/python3.12/site-packages/vtkmodules/libvtkRenderingOpenGL2.so`

But it mostly points to other vtk libraries in the venv, except basic linux system libraries (to my knowledge, not any problematic graphics package):

linux-vdso.so.1 (0x00007ed2ebd76000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007ed2eb200000)  
libpthread.so.0 =\> /lib/x86\_64-linux-gnu/libpthread.so.0 (0x00007ed2eb413000)  
libstdc++.so.6 =\> /lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007ed2dfa00000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007ed2e9917000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007ed2ead1e000)

So I am at a loss here.

For more info, I am using Ubuntu 24.04, 6.17.0-19-generic, x11.

I would really appreciate any help 🙂

Thank you in advance!  
Abraham

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [March 18, 2026, 12:51pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/8 "2026-03-18T12:51:15Z")

</div>

@sankhesh

---

<div class="post-metadata">

### Author: ![marpoleSim](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@marpoleSim](https://discourse.vtk.org/u/marpoleSim)
#### Post date: [March 18, 2026, 6:02pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/9 "2026-03-18T18:02:46Z")

</div>

I recalled that I still used conda but not python environment (i.e. venv).

I created a brand new conda environment where I installed all pyvista requirements, and installed vtk with pip install (not conda install).

---

<div class="post-metadata">

### Author: ![AbrahamSV](https://discourse.vtk.org/user_avatar/discourse.vtk.org/abrahamsv/32/10567_2.png) [@AbrahamSV](https://discourse.vtk.org/u/AbrahamSV)
#### Post date: [March 19, 2026, 12:01pm UTC](https://discourse.vtk.org/t/python-error-vtkxopenglrenderwindow-could-not-find-a-decent-config/15992/10 "2026-03-19T12:01:39Z")

</div>

Thanks for the response!!

I actually managed to solve it through conda.

I created a fresh conda env, and after installing quite a lot of packages and dependencies, it worked!

Conda solved some system dependencies automatically for pyvista, but I still installed vtk through pip.

I simply bumped into a bunch of dependencies (ipywidgets, pyvistaqt, ipyevents, ipympl, trame), but I got all of them installed through conda without problems.

Finally, I am running things on a jupyter notebook, so I had to do:

`pip install “pyvista[jupyter]”`

And after that everything is working.

Thanks again!  
Abraham
