mikaem / fenicstools

55 stars 36 forks source link

import on error #5

Closed gasagna closed 9 years ago

gasagna commented 10 years ago

HI,

cloned the repo and installed. I get this error on importing fenicstools:

python -c "import fenicstools"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/vagrant/home/.installdir/lib/python2.7/site-packages/fenicstools/__init__.py", line 8, in <module>
    from DofMapPlotter import DofMapPlotter
ImportError: cannot import name DofMapPlotter

I cannot understant why python complains about DofMapPlotter, which is in the path.

Davide

MiroK commented 10 years ago

Hi, I can't reproduce this bug on my machine. Is the rest of the installation okay? I mean, if you comment out the from DofMapPlotter import DofmapPlotter line in init.py and run some test or demo not related to dofmaps, is everything running smoothly then?

gasagna commented 10 years ago

Hi, yes, the rest seems fine. It is indeed a very strange bug, which I cannot understand.

ghost commented 10 years ago

Hi, I think this is simply because the matplotlib package is not installed. We should probably make a test and enable DofMapPlotter only if matplotlib is installed.