Problem with input() and Netgen

I would like to draw some functions in a for loop and visualize them using “input()” so I can check the result. The issue is that NGSolve crashes if I have an “input()” (even outside a loop as in the example below), giving me this error “Tcl_WaitForEvent: Notifier not initialized”.
Here is the small example I run:

from ngsolve import *
from netgen.geom2d import unit_square
mesh = Mesh (unit_square.GenerateMesh(maxh=1))
fes = H1(mesh, order = 1)
gfu = GridFunction(fes)
gfu.vec[:] = 0

Thank you in advance!

what os do you use and how did you install? is it when you run with netgen or python?
what happens if you run with python -m netgen.gui
best Christopher

Hi Christopher,
I have a MacPro 2,3 GHz 8-Core Intel Core i9. The issue is when I run it with netgen but the command you suggested also gives the same error. I updated netgen to the latest version as well.
Thank you for the help!

Dear Christopher,
If I add “import netgen.gui” as library and run the code with “python” now it works with the input() function.
Many thanks!