Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17960

Re: installing matplotlib in MacOs 10.6.8.

From Ned Deily <nad@acm.org>
Subject Re: installing matplotlib in MacOs 10.6.8.
Date 2011-12-26 09:54 -0500
References <CAMW75Yv5f=PdcZqt-ti=iee7gxGfzqP8jXh485zjohd9L63vvA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4101.1324911298.27778.python-list@python.org> (permalink)

Show all headers | View raw


In article 
<CAMW75Yv5f=PdcZqt-ti=iee7gxGfzqP8jXh485zjohd9L63vvA@mail.gmail.com>,
 Alex Ter-Sarkissov <ater1980@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@acm.org

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: installing matplotlib in MacOs 10.6.8. Ned Deily <nad@acm.org> - 2011-12-26 09:54 -0500

csiph-web