In the lastest version, "from ngsolve.webgui import Draw" is invalid

Dear all,

I have updated my NGSolve to the lastest version, v6.2.2104, but I also found that “from ngsolve.webgui import Draw” is invalid if using jupyter notebook to run my programs. How to fix it?

PS: If I run “from ngsolve.webgui import Draw”, the followings will appear:


ModuleNotFoundError Traceback (most recent call last)
in
1 # import netgen.gui
2 from ngsolve import *
----> 3 from ngsolve.webgui import Draw
4 from netgen.geom2d import SplineGeometry

C:\Program Files\ngsolve-v6.2.2104\lib\site-packages\ngsolve\webgui.py in
5 import os
6
----> 7 from webgui_jupyter_widgets import BaseWebGuiScene, encodeData, WebGuiDocuWidget
8 import webgui_jupyter_widgets.widget as wg
9

ModuleNotFoundError: No module named ‘webgui_jupyter_widgets’

Best,

Di Yang

Hi Di Yang,

The webgui was outsourced into a separate repository. Thus, the installation instructions to use it changed slightly, have a look here:
https://docu.ngsolve.org/latest/i-tutorials/index.html#installation

Best,
Matthias

Thank you very much. It works indeed.