Hi Peter,
this problem is certainly caused by the recent decoupling of the core code and the gui.
I can confirm the problem on MacOS, a fix is the following:
add "import netgen.gui" into the py-script, and run the file using "python3 script.py"
Joachim