See Announcement: ufl_legacy and legacy dolfin
To fix that:
- you must uninstall your local installation of ufl, i.e. the one in /home/fenics/.local/lib/python3.10/site-packages/
- you must import ufl_legacy and not ufl
See Announcement: ufl_legacy and legacy dolfin
To fix that: