ImportError: cannot import name 'AbstractFiniteElement' from 'ufl.finiteelement'

You can’t mix an installation of dolfinx from the PPA with an installation of basix from pip. Run pip uninstall fenics-basix and verify that you are prompted to remove /home/prusso/.local/lib/python3.10/site-packages/basix.

Furthermore don’t go and download the demos from GitHub, because they might be for a newer version than the one you have installed. When install from the PPA, you have a package

dolfinx-doc Documentation and demo programs for DOLFIN

that install demos in /usr/share/doc/dolfinx. Copy them from there to your home.

1 Like