Ubuntu

fenics with EPD

Asked by calbaker on 2012-06-08

I installed FEniCS in Ubuntu 12.04, and it works fine on the native python. However, I use Enthought Python Distribution (http://www.enthought.com/products/epd.php) and the EPD PYTHONPATH does not include FEniCS. How can I fix this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu fenics Edit question
Assignee:
No assignee Edit question
Solved by:
calbaker
Solved:
2012-06-15
Last query:
2012-06-15
Last reply:
2012-06-14
Johannes Ring (johannr) said : #1

I don't know much about EPD but this might help you out:

http://atinfinity.wordpress.com/2011/08/05/epd-python-on-ubuntu/

calbaker (calbaker) said : #2

This nearly solved my problem, and this addressed a bunch of other minor inconveniences with a much more efficient workaround than what I had been doing. My python distribution is aware that it has dolfin, but when I try to run

>>>> from dolfin import *

I get:

ImportError: /usr/lib/libpetsc.so.3.1: undefined symbol: H5Pset_dxpl_mpio

It seems to be unhappy with this line:
                _mod = imp.load_module('_cpp', fp, pathname, description)

I may be able to figure this out myself. I'll revisit this problem tomorrow.

Johannes Ring (johannr) said : #3

For me, the H5Pset_dxpl_mpio symbol is defined in /usr/lib/libhdf5.so.6 and /usr/lib/libpetsc.so.3.1 is dynamically linked to it.

calbaker (calbaker) said : #4

Well, it seems when I put /usr/lib/python2.7/dist-packages in my PYTHONPATH, numpy and a bunch of other stuff gets imported from the Ubuntu python distro rather than EPD. If I could figure out a way to prioritize libraries from the EPD path, I think it would fix this problem.

Johannes Ring (johannr) said : #5

Try to put it at the end of PYTHOHNPATH.

calbaker (calbaker) said : #6

Putting it at the end of PYTHONPATH still put in the the middle of sys.path after starting the interpreter because of the EPD default path variable. I used sys.path.remove to remove it from the middle, and then I used sys.path.append to append it to the path. The same error still happens.

calbaker (calbaker) said : #7

I reinstalled Ubuntu completely from scratch, and now dolfin works with EPD after I compiled and installed it locally within ~/.local. I have no idea why this works.