Hii , I am very new to fenics. I installed it on ubuntu 22.04. Initially everything was working well but today I updated everything on my system. After updating when I am running the same programme , I am getting this error-
Traceback (most recent call last):
File “/home/sushil/Documents/Python tutorial/test3.py”, line 1, in
from fenics import *
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)
I will be very thankful to you for any suggestion.
Hi, I tried installing FEniCS for the first time today (just a few hours ago) from the PPA and I got the same error as suchilkv, is it possible for it not to be fixed yet?
I’m running ubuntu 20.04, here is the error message:
Traceback (most recent call last):
File "p_laplacian.py", line 3, in <module>
from fenics import *
File "/usr/lib/python3/dist-packages/fenics/__init__.py", line 7, in <module>
from dolfin import *
File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 138, in <module>
from . import parameter
File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/__init__.py", line 11, in <module>
from ffc import default_jit_parameters
File "/home/ana/.local/lib/python3.8/site-packages/ffc/__init__.py", line 24, in <module>
from ffc.compiler import compile_form, compile_element
File "/home/ana/.local/lib/python3.8/site-packages/ffc/compiler.py", line 129, in <module>
from ffc.codegeneration import generate_code
File "/home/ana/.local/lib/python3.8/site-packages/ffc/codegeneration.py", line 37, in <module>
import ffc.uflacs.language.cnodes as L
File "/home/ana/.local/lib/python3.8/site-packages/ffc/uflacs/__init__.py", line 23, in <module>
from ffc.uflacs.uflacsrepresentation import compute_integral_ir
File "/home/ana/.local/lib/python3.8/site-packages/ffc/uflacs/uflacsrepresentation.py", line 26, in <module>
from ffc.representationutils import initialize_integral_ir
File "/home/ana/.local/lib/python3.8/site-packages/ffc/representationutils.py", line 28, in <module>
from ufl.cell import cellname2facetname
ImportError: cannot import name 'cellname2facetname' from 'ufl.cell' (/usr/lib/python3/dist-packages/ufl/cell.py)
Oh!! Any ideas on how to do that? because I’ve tried doing sudo apt remove fenics but then it all stops working because it says I dont have fenics at all
pip would install there (e.g. pip3 install --user ffc), so you could try pip3 uninstall --user ffc.
If nothing else works, you could try simply deleting /home/ana/.local/lib/python3.8/site-packages/ffc. Might be worth inspecting that local site to see if anything else has infiltrated into your system.