I am running Ubuntu 14.04, and python 2.7.6, and have had trouble running importing DOLFIN. I used the following commands to install, as suggested by FENiCS documentation:
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics
sudo apt-get dist-upgrade
No errors occurred during installation, but when running the command
from dolfin import *
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/dolfin/__init__.py", line 16, in <module>
from . import cpp
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/__init__.py", line 42, in <module>
exec("from . import %s" % module_name)
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/function.py", line 209, in <module>
class GenericFunction(ufc.function, common.Variable):
AttributeError: 'module' object has no attribute 'function'
Any help would be greatly appreciated. Thanks!