Problem installing latest matplotlib + numpy win32 binaries

Hello all,

My apologies if this has been brought up and solved before, but I
didn't see any solutions that made sense to me in the archives. Here
is my stack:
python 2.4 (from python.org)
numpy-1.0rc3
matplotlib-0.87.6

Everything seems to install fine. When I attempt to do 'from pylab
import *' I get the following error:

RuntimeError: module compiled against version 1000002 of C-API but this version
of numpy is 1000009

The import of the numpy version of the nxutils module,
_nsnxutils, failed. This is is either because numpy was
unavailable when matplotlib was compiled, because a dependency of
_nsnxutils could not be satisfied, or because the build flag for
this module was turned off in setup.py. If it appears that
_nsnxutils was not built, make sure you have a working copy of
numpy and then re-install matplotlib. Otherwise, the following
traceback gives more details:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Development\Python25\Lib\site-packages\pylab.py", line 1, in <module>

    from matplotlib.pylab import *
  File "C:\Development\Python25\Lib\site-packages\matplotlib\pylab.py", line 199
, in <module>
    import mlab #so I can override hist, psd, etc...
  File "C:\Development\Python25\Lib\site-packages\matplotlib\mlab.py", line 64,
in <module>
    import nxutils
  File "C:\Development\Python25\Lib\site-packages\matplotlib\nxutils.py", line 1
7, in <module>
    from matplotlib._ns_nxutils import *
ImportError: numpy.core.multiarray failed to import

I saw an e-mail in the archive that had a similar error, but the
solution was apparently to install scipy-0.51? I don't need or
necessarily want scipy.. is there a reason the latest win32 binaries
for matplotlib and numpy don't play together? Any help is appreciated.
Thanks!

- Todd

···

--
Todd Page
twpage@...287...

Todd Page wrote:

Hello all,

My apologies if this has been brought up and solved before, but I
didn't see any solutions that made sense to me in the archives. Here
is my stack:
python 2.4 (from python.org)
numpy-1.0rc3
matplotlib-0.87.6

Everything seems to install fine. When I attempt to do 'from pylab
import *' I get the following error:

RuntimeError: module compiled against version 1000002 of C-API but this version
of numpy is 1000009

If I remember correctly, mpl 0.87.6 is compiled against numpy-1.0.rc2, but rc3 has since come out with a C-API change so that it will not work with 0.87.6. So, give numpy-1.0.rc2 a try. numpy 1.0 is scheduled to come out soon, and I expect that shortly thereafter there will be an mpl release to match it. At that point the numpy C API should be genuinely stable and it should no longer be necessary to keep future mpl and numpy versions in lockstep.

Eric

Thanks Eric,

That confirms my suspicions. Does anyone know where I can get an rc2
binary for win32? I only see rc3 up on sourceforge.

PS: I think my original e-mail got posted to the list twice... if
that's the case I apologize for the (inadvertent) spam.

···

On 10/22/06, Eric Firing <efiring@...202...> wrote:

Todd Page wrote:
> Hello all,
>
> My apologies if this has been brought up and solved before, but I
> didn't see any solutions that made sense to me in the archives. Here
> is my stack:
> python 2.4 (from python.org)
> numpy-1.0rc3
> matplotlib-0.87.6
>
> Everything seems to install fine. When I attempt to do 'from pylab
> import *' I get the following error:
>
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009

If I remember correctly, mpl 0.87.6 is compiled against numpy-1.0.rc2,
but rc3 has since come out with a C-API change so that it will not work
with 0.87.6. So, give numpy-1.0.rc2 a try. numpy 1.0 is scheduled to
come out soon, and I expect that shortly thereafter there will be an mpl
release to match it. At that point the numpy C API should be genuinely
stable and it should no longer be necessary to keep future mpl and numpy
versions in lockstep.

Eric

--
Todd Page
twpage@...287...