installing matplotlib in MacOs 10.6.8.
Ned Deily
nad at acm.org
Mon Dec 26 09:54:41 EST 2011
In article
<CAMW75Yv5f=PdcZqt-ti=iee7gxGfzqP8jXh485zjohd9L63vvA at mail.gmail.com>,
Alex Ter-Sarkissov <ater1980 at gmail.com> wrote:
> hi everyone, I run python 2.7.2. in Eclipse (recently upgraded from 2.6). I
> have a problem with installing matplotlib (I found the version for python
> 2.7. MacOs 10.3, no later versions). If I run python in terminal using arch
> -i386 python, and then
>
> from matplotlib.pylab import *
>
> and similar stuff, everything works fine. If I run python in eclipse or
> just without arch -i386, I can import matplotlib as
>
> from matplotlib import *
>
> but actually nothing gets imported. If I do it in the same way as above, I
> get the message
>
> no matching architecture in universal wrapper
>
> which means there's conflict of versions or something like that. I tried
> reinstalling the interpreter and adding matplotlib to forced built-ins, but
> nothing helped. For some reason I didn't have this problem with numpy and
> tkinter.
The message means almost certainly means that the Python you are using
is a 64-bit/32-bit universal version. When you launch Python with -arch
i386, you force the Python to run in 32-bit mode so it is compatible
with the 32-bit-only version of matplotlib you've installed in it. When
you launch Python by default, it is runnning in 64-bit mode so the
32-bit-only C extension modules in that version of matplotlib cannot be
loaded. You might want to ask the matplotlib developers to make a
64-bit version available. In the mean time, you could try to configure
Eclipse to invoke the python with `python2.7-32`, which is included with
distributions like the python.org one to force Python to run in 32-bit
mode on OS X.
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list