Hello to everyone, Actually i’m having a lot of problems related to fenicsx and i have been trying to solve it for a long time and i decided to come here and ask help. First of all, i installed Dolfinx from the website: Demos — DOLFINx 0.7.2 documentation
And then, i installed for linux using:
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt update
sudo apt install fenicsx
And it went well and any error appeared. However, when i tried to test in this example from the site: Electromagnetics example — FEniCSx tutorial
And there is no error in the import commands, but when i run in vs code, it has appears:
Traceback (most recent call last):
File “/home/philip/Documents/math-programming/MATH /PDEs/magu.py”, line 1, in
from dolfinx import default_scalar_type
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/init.py”, line 40, in
from dolfinx import fem, geometry, graph, io, jit, la, log, mesh, nls, plot
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/init.py”, line 12, in
from dolfinx.fem.assemble import (apply_lifting, assemble_matrix,
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/assemble.py”, line 22, in
from dolfinx.fem.forms import Form
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/forms.py”, line 17, in
from dolfinx import default_scalar_type, jit
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/jit.py”, line 17, in
import ffcx.codegeneration.jit
File “/usr/lib/python3/dist-packages/ffcx/codegeneration/jit.py”, line 21, in
import ffcx.naming
File “/usr/lib/python3/dist-packages/ffcx/naming.py”, line 16, in
from .element_interface import convert_element
File “/usr/lib/python3/dist-packages/ffcx/element_interface.py”, line 12, in
import basix.ufl
File “/home/philip/.local/lib/python3.10/site-packages/basix/ufl.py”, line 22, in
_basix.SobolevSpace.HInf: _ufl.sobolevspace.HInf,
AttributeError: module ‘ufl.sobolevspace’ has no attribute ‘HInf’
And, furthermore, when i checked the Dolfinx version also in VS code, it has appeared:
Traceback (most recent call last):
File “/home/philip/Documents/math-programming/MATH /sad.py”, line 1, in
import dolfinx
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/init.py”, line 40, in
from dolfinx import fem, geometry, graph, io, jit, la, log, mesh, nls, plot
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/init.py”, line 12, in
from dolfinx.fem.assemble import (apply_lifting, assemble_matrix,
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/assemble.py”, line 22, in
from dolfinx.fem.forms import Form
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/forms.py”, line 17, in
from dolfinx import default_scalar_type, jit
File “/usr/lib/petsc/lib/python3/dist-packages/dolfinx/jit.py”, line 17, in
import ffcx.codegeneration.jit
File “/usr/lib/python3/dist-packages/ffcx/codegeneration/jit.py”, line 21, in
import ffcx.naming
File “/usr/lib/python3/dist-packages/ffcx/naming.py”, line 16, in
from .element_interface import convert_element
File “/usr/lib/python3/dist-packages/ffcx/element_interface.py”, line 12, in
import basix.ufl
File “/home/philip/.local/lib/python3.10/site-packages/basix/ufl.py”, line 22, in
_basix.SobolevSpace.HInf: _ufl.sobolevspace.HInf,
AttributeError: module ‘ufl.sobolevspace’ has no attribute ‘HInf’
So, it’s basically the same error whenever i use Dolfilnx. So, what might be causing this? Can someone explain me please how i fix it?