Installing dolfin - weird error

Hi, it has been 2 months that I am running fenics on google colab (python), but today when I runned the same code and first wanted to install Dolfin using the same command which I use every day, I got an error. Can someone help me with this?

The command:

"try:
import dolfin
except ImportError:
!wget “https://fem-on-colab.github.io/releases/fenics-install.sh” -O “/tmp/fenics-install.sh” && bash “/tmp/fenics-install.sh”
import dolfin
"

The error:

ModuleNotFoundError Traceback (most recent call last)
in ()
1 try:
----> 2 import dolfin
3 except ImportError:

ModuleNotFoundError: No module named ‘dolfin’

During handling of the above exception, another exception occurred:

ModuleNotFoundError Traceback (most recent call last)
in ()
3 except ImportError:
4 get_ipython().system(‘wget “https://fem-on-colab.github.io/releases/fenics-install.sh” -O “/tmp/fenics-install.sh” && bash “/tmp/fenics-install.sh”’)
----> 5 import dolfin
6

ModuleNotFoundError: No module named ‘dolfin’


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
“Open Examples” button below.

Please try again, it is working for me now. Most probably either github.com or some PPA were down, and some step of the installation didn’t complete successfully.

For future reference for other users:

  1. the most relevant part of the error was actually the long output above the part you reported, in which the download and installation actually takes place,
  2. consider opening an issue on GitHub - fem-on-colab/fem-on-colab . This time you have been lucky I (lead developer of FEM on Colab) spotted the message on discourse

Cheers,
Francesco

1 Like

Hi Francesco, It is working now. Thanks!