Error while test with tutorials

https://fenicsproject.discourse.group/t/error-running-demo-code/290/2
Here, johannr gave one solution.