← Back to team overview

dolfin team mailing list archive

Re: Running Tutorial Script

 

Anders Logg wrote:
Garth N. Wells wrote:

Lorenzo Isella wrote:
Hi Anders,
And thanks for your help.
I suspect my problem is rather trivial and with some more adequate
computer skills I could fix it myself.
This is the content of the directory you mentioned:

~/temp$ ls /usr/lib/python2.5/site-packages/dolfin/
assemble.py   constants.pyc  dolfin.py   _dolfin.so.0      __init__.pyc
assemble.pyc  _dolfin.a      dolfin.pyc  _dolfin.so.0.0.0  plot.py
constants.py  _dolfin.la     _dolfin.so  __init__.py       plot.pyc

However, see what happens when I fire up python2.5 and try importing dolfin:

~/temp$ python2.5
Python 2.5.1 (r251:54863, Aug 17 2007, 00:51:07)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import dolfin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/dolfin/__init__.py", line 4,
in <module>
    from assemble import *
  File "/usr/lib/python2.5/site-packages/dolfin/assemble.py", line 16,
in <module>
    from ffc import *
ImportError: No module named ffc

So I see and error message because ffc is missing. But that is really
odd as my system sees it as installed.
In fact, I can easily import ffc, but under python 2.4 (which seems to
be the default on my box).
See:

~/temp$ python
Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import ffc
and no error message is given. It seems to me that dolfin wants to run
under python2.5 and ffc asks for 2.4.
How can I fix that? Everything is already there!
If you install both packages with the default Python version, things should work out. To force FFC to use Python 2.5, in the FFC directory do

  python2.5 setup.py install

Make sure that you do the same for FIAT.

Garth

I think he installed from the Debian packages so this won't help?

/Anders

Hello,

This is related to the problem that I encountered when trying to build syfi from the deb-src in debian/sid. If you install the packages from the fenics repository in debian, *not* ubuntu, libdolfin-dev gets installed under /usr/lib/python2.5/... but ffc etc are installed under the *default* python library tree, which is python 2.4 as far as debian is concerned.

My suggestion is to package them with an explicit dependency on python 2.5 so that it can also play nice with debian.

Regards,
ST
--


Follow ups

References