On Jul 17, 2008, at 5:30 PM, Zhiwen Liang wrote:

Then I tried to find the pylab. There is only one pylab.py in my computer and it lives at the same site-packages directory as matplotlib, which is /sw/lib/python2.3/site-packages.

Python imports can be kind of tricky sometimes, which is why I asked you to report the result of

   >>> import pylab
   >>> pylab.__file__

But Jon is right, it is broken. I had trouble importing pylab.

Meaning what? I don't believe it's possible to get the error "'module' object has no attribute 'ion'" without importing *something*. If `import pylab` fails, then you should have gotten a different error message from `viewers.make()`.

What I don't understand is, matplotlib and pylab are just viewers and the example of 1D diffusion should only use gistViewer. The code tries to use gistViewer before it tries matplotlib. Right?

No, it doesn't only use gistViewer. It uses the first viewer that it can find that actually works. gistViewer and gnuplotViewer failed, so it tried matplotlibViewer. I addressed that one first, because the error was easier to diagnose.

I don't know why your other viewers are throwing "The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()". examples/diffusion/mesh1D.py does not generate that error with any of our viewers. Have you modified the example in any way? Are you running the tip of trunk/?

To determine what is the problem, please edit fipy/viewers/__init__.py and at line 108, please add

        except Exception:
            raise

*above* the line that says `except Exception, s` and then report back the full text of the error trace.

Another problem I found is, after installing fipy, it creates a Fipy-2.0a1-py2.3.egg directory, instead of a single fipy directory, under the site-packages directory. But there is a fipy under Fipy-2.0a1-py2.3.egg. I can still import fipy. Is that normal?

Yes. It's one result of our switch to setuptools.

I tried to install fipy in another machine, but with no luck. That machine has matplotlib working properly. The message I got was "Fatal Python error: Interpreter not initialized (version mismatch?)". The gcc compiler is the same as when python was built.

gcc is not the problem. The Python interpreter has changed since some library was compiled against it. That's not FiPy because FiPy is not compiled. Likely candidates are PySparse, NumPy, SciPy, or any of the viewers.


Reply via email to