I am running fenics legacy on Ubuntu 20.04. I need the 2019.1.0 version of dolfin/fenics so my prof’s code will work on my computer. Installed using code from website:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics
import fenics as fe
from dolfin import *
from dolfin_adjoint import *
print(dolfin.dolfin_version())
Traceback (most recent call last):
File “MWE_fenics.py”, line 1, in
import fenics as fe
File “/usr/lib/python3/dist-packages/fenics/init.py”, line 7, in
from dolfin import *
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/init.py”, line 138, in
from . import parameter
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/init.py”, line 11, in
from ffc import default_jit_parameters
File “/usr/lib/python3/dist-packages/ffc/init.py”, line 24, in
from ffc.compiler import compile_form, compile_element
File “/usr/lib/python3/dist-packages/ffc/compiler.py”, line 129, in
from ffc.codegeneration import generate_code
File “/usr/lib/python3/dist-packages/ffc/codegeneration.py”, line 37, in
import ffc.uflacs.language.cnodes as L
File “/usr/lib/python3/dist-packages/ffc/uflacs/init.py”, line 23, in
from ffc.uflacs.uflacsrepresentation import compute_integral_ir
File “/usr/lib/python3/dist-packages/ffc/uflacs/uflacsrepresentation.py”, line 26, in
from ffc.representationutils import initialize_integral_ir
File “/usr/lib/python3/dist-packages/ffc/representationutils.py”, line 28, in
from ufl.cell import cellname2facetname
ImportError: cannot import name ‘cellname2facetname’ from ‘ufl.cell’ (/usr/lib/python3/dist-packages/ufl/cell.py)
My programming skills are low. Been a hot minute since I was programming (early 1990s) and a lot has changed since then.