← Back to team overview

dolfin team mailing list archive

Re: Running Tutorial Script

 

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!
Many thanks

Lorenzo




On 17/09/2007, Anders Logg <logg@xxxxxxxxx> wrote:
> What happens if you start Python and just type
>
> import dolfin
>
> ?
>
> DOLFIN should be installed under
>
> /usr/lib/python2.5/site-packages/dolfin/
>
> (or 2.4?)
>
> /Anders
>
>
> Lorenzo Isella wrote:
> > Dear All,
> > Thanks for the answers I was provided with.
> > After installing libdolfin-dev, I tried running the example in the
> > tutorial (http://www.fenics.org/wiki/Tutorial) only to get the following
> > error message:
> >
> > ~/temp$ python poisson.py
> > Traceback (most recent call last):
> >   File "poisson.py", line 1, in ?
> >     from dolfin import *
> > ImportError: No module named dolfin
> >
> > where poisson.py is the file where I saved the python script of the
> > tutorial.
> > Anybody having the same problem? Where has the dolfin module ended up?
> > Cheers
> >
> > Lorenzo
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
>


Follow ups

References