Import Error when running fenicsx on colab

The title is misleading: the library imports just fine.

I’ve never seen the error “cannot change memory protections” in my 10+ years of experience with unix, but I suspect it may have to do with how google mounts the drives in the colab runtime instances.

If that is the issue, there may not be much we can do, especially not without a minimal example at hand. You should see if it is really necessary to create the dolfinx.fem.form repeatedly (in a for loop, I guess), or if you can create it once and for all outside of the loop.