Problem about pyvista

Pyvista requires an x-server (frame-buffer) to plot when running python scripts. This is not activated by default on windows, see: How to use GUI apps in WSL2 (forwarding X server) | Aitor Alonso (aalonso.dev)
You can either

  1. Follow the instructions above to get an x-server to render the GUI of pyvista
  2. Set environment variable PYVISTA_OFF_SCREEN=true. Start a virtual frame-buffer prior to plotting (pyvista.start_xvfb()), Add a plotter.screenshot("figure.png") instead of the plotter.show(). This will save a png of the figure.