I usually output to file, so if this is obvious, my apologies.
I can copy-paste this example, and it works just fine: a window pops up with a cone in it. I tried to simplify it a bit and run it, and this code exits immediately, with no window shown and no error?
from vtkmodules.vtkFiltersSources import vtkConeSource
from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackballCamera
from vtkmodules.vtkRenderingCore import (
vtkActor,
vtkPolyDataMapper,
vtkRenderer,
vtkRenderWindow,
vtkRenderWindowInteractor)
t = vtkConeSource()
mapper = vtkPolyDataMapper()
mapper.SetInputConnection(t.GetOutputPort())
actor = vtkActor()
actor.SetMapper(mapper)
ren = vtkRenderer()
ren.AddActor(actor)
ren_win = vtkRenderWindow()
ren_win.AddRenderer(ren)
ren_win.SetSize(640, 480)
ren_win.SetWindowName("Test")
iren = vtkRenderWindowInteractor()
iren.SetRenderWindow(ren_win)
ren_win.Render()
iren.Start()