FEniCSx on Google Colab

Has anyone been able to successfully launch FEniCSx on the Google Colab platform? I stumbled across an example by github/bilgin-kocak available at the following link but it does not seem to run anymore.

Specifically in the Google Colab (Python3 on Ubuntu 18.04.3), I’ve tried running the FEniCSx Ubuntu PPA installations:

add-apt-repository ppa:fenics-packages/fenics
apt update
apt install fenicsx

This will return the following Error, shown in the last line of the following image:
E: Unable to locate package fenicsx

.

Does anyone know what I may be missing in order to install fenicsx?

The problem with google colab is that it uses the very outdated ubuntu 18.04, see: Upgrading Colab host environment to Ubuntu LTS 20.04 · Issue #1880 · googlecolab/colabtools · GitHub

However, there are workarounds for this at:

2 Likes

Thank you for clarifying that! It seems that the code from the FEM on Colab link is working now - I appreciate the help.