installing FEniCS on MAC

750 views
Skip to first unread message

Amit Jain

unread,
Feb 10, 2016, 10:08:26 PM2/10/16
to fenics-support
Hi,
I installed FEniCS using .dmg file on the given link " http://fenicsproject.org/download/osx_details.html ".
But while running the demo script, it shows import error as follows:

, line 37, in <module>

    from dolfin import *

ImportError: No module named dolfin


Could anyone please help me?

Thanks,
Amit Jain

Johannes Ring

unread,
Feb 11, 2016, 3:50:08 AM2/11/16
to Amit Jain, fenics-support
How did you run the script? Did you follow the instructions to either
click on the FEniCS icon in the Applications folder or to source
/Applications/FEniCS.app/Contents/Resources/share/fenics/fenics.conf?
What did you do?

Johannes
> --
> You received this message because you are subscribed to the Google Groups
> "fenics-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fenics-suppor...@googlegroups.com.
> To post to this group, send email to fenics-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fenics-support/025d5be2-92d2-4575-adba-d1d8304195cd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Amit Jain

unread,
Feb 11, 2016, 7:46:16 AM2/11/16
to fenics-support
I clicked on the FEniCS icon in application folder, then my terminal window opened automatically with following script and attached dialog box


Amits-MBP:~ amitjain$ /Applications/FEniCS.app/Contents/Resources/bin/fenics-terminal ; exit;

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.

Deleting expired sessions...none found.


[Process completed]


I put the line "source /Applications/FEniCS.app/Contents/Resources/share/fenics/fenics.conf" in .profile file in home directory. But when I try to run a demo program, I am getting an import error. 




Screen Shot 2016-02-11 at 6.43.46 AM.png

Johannes Ring

unread,
Feb 11, 2016, 7:53:58 AM2/11/16
to Amit Jain, fenics-support
Well, the screenshot is pretty clear about what the problem is. You
are using Python from /opt/moose/miniconda, which does not work with
the FEniCS binary package.

Johannes
> https://groups.google.com/d/msgid/fenics-support/9348001e-d154-4698-a9ea-feeb9b2676ac%40googlegroups.com.

Amit Jain

unread,
Feb 11, 2016, 8:03:44 AM2/11/16
to fenics-support
But when I see python location on PC using command "type -a python"
i get the following outputs

python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python

python is /opt/moose/miniconda/bin/python

python is /usr/local/bin/python

python is /usr/bin/python


Does it mean that python is installed in the system but FEniCS could not able to pick it up? Also, please suggest me what I can do to run FEniCS script.


Thanks,

Amit 

Johannes Ring

unread,
Feb 11, 2016, 8:20:20 AM2/11/16
to Amit Jain, fenics-support
It means that python is installed on the system but it is not the
first python in your PATH. To see which python is first in your PATH,
run `which python`. The output should be "/usr/bin/python" when you
are using the FEniCS package. If it's not, then you have to modify
your PATH.

Johannes
> https://groups.google.com/d/msgid/fenics-support/88ac7b35-a048-418d-82d6-32cb36fc4fb4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages