Trouble running the tutorial em.ipynb

When I try to run the tutorial
https://notebooks.gesis.org/binder/jupyter/user/jorgensd-dolfinx-tutorial-3erqv8lb/lab/tree/chapter3/em.ipynb
I get the diagnostic
{
“name”: “ModuleNotFoundError”,
“message”: “No module named ‘gmsh’”,
“stack”: "---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 13
10 from ufl import TestFunction, TrialFunction, as_vector, dot, dx, grad, inner
11 from mpi4py import MPI
—> 13 import gmsh
14 import numpy as np
15 import pyvista

ModuleNotFoundError: No module named ‘gmsh’"
}
How can I import gmsh? Is this not a standard part of the fenicsx installation?

It’s not. gmsh is a standalone library: not sure how it works on binder, if it you were running on your system if you need gmsh you’ll need to install it yourself.

I am running on my system. This is a little confusing to me. dolfinx.mesh is also a library of meshing routines. Is it possible to create the same mesh in the tutorial using these routines? If so, why not use these routines in the tutorial? If not, what capabilities does gmsh have that dolfinx.mesh does not have?
I am interested in creating 2D meshes and just learning how to use fenicsx. I would like to know which meshing resources I will need to download and learn to use.

dolfinx.mesh only has simple meshes (interval, rectangle and box meshes).

As GMSH is a dedicated meshing software, we can interface with their Python-API through dolfinx.io.gmshio, which used the GMSH Python api to read in Gmsh models or meshes.

How do I download the software I would need for this tutorial?
“As GMSH is a dedicated meshing software, we can interface with their Python-API through dolfinx.io.gmshio , which used the GMSH Python api to read in Gmsh models or meshes.”
Where can I learn about how to do this? For starters, I would like to run your tutorial on my machine. How do I install the missing pieces I need in order to do this?

Gmsh can be downloaded with pip.

Note that the dolfinx tutorial lists how one can easily get all dependencies
https://jsdokken.com/dolfinx-tutorial/fem.html#tutorial-compatible-docker-images
or consult

I got things running by downloading with pip. I still haven’t been able to figure out how to create and use a docker file to run a python program. At some point I may be forced to learn this, but for now I can postpone it.