Zhiwen Liang | 21 Jul 17:02

Re: Problems on Installing New Fipy

Hi

On Mon, Jul 21, 2008 at 10:17 AM, Jonathan Guyer <guyer-R3+/ord2DXQ@public.gmane.org> wrote:


On Jul 19, 2008, at 11:44 AM, Zhiwen Liang wrote:

When I "import pylab", I got:

>>> import pylab
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/sw/lib/python2.3/site-packages/pylab.py", line 1, in ?
   from matplotlib.pylab import *
 File "/sw/lib/python2.3/site-packages/matplotlib/pylab.py", line 196, in ?
   import cm
 File "/sw/lib/python2.3/site-packages/matplotlib/cm.py", line 5, in ?
   import colors
 File "/sw/lib/python2.3/site-packages/matplotlib/colors.py", line 33, in ?
   from numerix import array, arange, take, put, Float, Int, where, \
 File "/sw/lib/python2.3/site-packages/matplotlib/numerix/__init__.py", line 68, in ?
   from _sp_imports import nx, infinity
 File "/sw/lib/python2.3/site-packages/matplotlib/numerix/_sp_imports.py", line 1, in ?
   from numpy import Int8, UInt8, \
ImportError: cannot import name Int8

Interesting. I need to figure out why viewers.make() doesn't report this error message to you, instead of the one about pylab.io() (mind you, I'd have had no idea where this error message was coming from, so we'll need to figure out an easier way to report backtraces for failing viewers).

In the meantime, please do provide the diagnostics that Daniel asked for.

 Regarding Daniel's question, I have the following output.

What happens when you do "python -c 'from numpy.oldnumeric import Int8'"?

I can import Int8  this way. 

What happens when you do "python -c 'from numpy import Int8'"?

The error is:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: cannot import name Int8

What happens when you do "python -c 'import numpy; print numpy.__version__'"?

It is 1.0.1



So I could not do "pylab.__file__". I confirmed there is only this pylab.py in my computer because if I uninstall matplotlib, there will be no module called pylab.

Understood. I just wanted to be certain that you were getting the import you thought you were; I've had subtle things happen with .pth files and such.


I agreed that python 2.3 is too old. Matplotlib now only releases new versions for python 2.4 and higher.

While I'm glad you agree, I'm a little puzzled. I thought the whole point of fink was that it kept different packages consistent with one another. If you have python 2.3, then it should be loading an appropriate version of matplotlib or it should be insisting that you install a newer version of python.



Fink still provide matplotlib for python 2.3, but from the errors I got, I have a feeling that this version is not compatible with the numpy I have. So I tried to download the source code and install myself but could not find anything for python 2.3.  Sorry if I confused you.

Thanks again,
Zhiwen



Gmane