When I tried to run demo code for python fenics, I came across this error:
Reading DOLFIN parameters from file "dolfin_parameters.xml".
*** -------------------------------------------------------------------------
*** Warning: UnitSquare has been deprecated in DOLFIN version 1.1.0.
*** The class UnitSquare has been replaced by UnitSquareMesh.
*** -------------------------------------------------------------------------
Traceback (most recent call last):
File "d1_p2D.py", line 15, in <module>
V = FunctionSpace(mesh, 'Lagrange', 1)
File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 390, in __init__
FunctionSpaceBase.__init__(self, mesh, element, constrained_domain)
File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 84, in __init__
ufc_element, ufc_dofmap = jit(self._ufl_element)
File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
return local_jit(*args, **kwargs)
File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 102, in jit
raise OSError, "Could not find swig installation. Pass an existing "\
OSError: Could not find swig installation. Pass an existing swig binary or install SWIG version 2.0 or higher.
I don't quite understand how to install swig for my computer.
I tried to use sudo port install swig
, and I installed swig. But I still get this error.
Can you help me with this? Thank you.