# VTK with PySide2 is not working

**URL:** https://discourse.vtk.org/t/vtk-with-pyside2-is-not-working/2439
**Category:** Support
**Created:** [January 16, 2020, 2:47pm UTC](https://discourse.vtk.org/t/vtk-with-pyside2-is-not-working/2439 "2020-01-16T14:47:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ian.liu88](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ian.liu88/32/1262_2.png) [@ian.liu88](https://discourse.vtk.org/u/ian.liu88)
#### Post date: [January 16, 2020, 2:47pm UTC](https://discourse.vtk.org/t/vtk-with-pyside2-is-not-working/2439/1 "2020-01-16T14:47:13Z")

</div>

The following example is not working properly:

```
import sys
import PySide2
from PySide2.QtWidgets import QApplication
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from vtkmodules.vtkFiltersSources import vtkConeSource
from vtkmodules.vtkRenderingCore import vtkActor, vtkPolyDataMapper, vtkRenderer

app = QApplication(['QVTKRenderWindowInteractor'])

widget = QVTKRenderWindowInteractor()
widget.Initialize()
widget.Start()

ren = vtkRenderer()
widget.GetRenderWindow().AddRenderer(ren)

cone = vtkConeSource()
cone.SetResolution(8)

coneMapper = vtkPolyDataMapper()
coneMapper.SetInputConnection(cone.GetOutputPort())

coneActor = vtkActor()
coneActor.SetMapper(coneMapper)

ren.AddActor(coneActor)

widget.show()
app.exec_()

```

It fails with the following message:

```
Generic Warning: In /build/vtk/src/VTK-8.2.0/Rendering/Core/vtkRenderWindow.cxx, line 35
Error: no override found for 'vtkRenderWindow'.

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    widget = QVTKRenderWindowInteractor()
  File "/usr/lib/python3.8/site-packages/vtkmodules/qt/QVTKRenderWindowInteractor.py", line 262, in __init__
    self._RenderWindow = vtkRenderWindow()
NotImplementedError: no concrete implementation exists for this class

```

Any help why this is happening? This is the example given in the distributed QVTKRendererWindowInteractor.py file on my Arch Linux vtk installation (version 8.2.0).

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [January 16, 2020, 3:03pm UTC](https://discourse.vtk.org/t/vtk-with-pyside2-is-not-working/2439/2 "2020-01-16T15:03:10Z")

</div>

Import `vtkmodules.vtkRenderingOpenGL2` and it will register itself as an implementation of `vtkRenderWindow`.
