installing matplotlib in MacOs 10.6.8.
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. Any suggestions are appreciated.
I suspect your getting a bit tangled up in the multiple binaries of Python on the Mac. On the python.org site there are two binaries: 32bit, PPC_Intel, OS-X 10.3.9 and above. 32 and 64 bit, Intel only, OS-X 10.6 and above. You need to make sure that you get a matplotlib build for the python build you are using. It looks like the current "official" binaries for MPL only support the 32bit PPC+Intel version: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0... If you use that (the 32 bit binary form pyton.org and the 32 bit MPL binary), you should be fine. If you need 64 bit, it looks like you are on your own for building (sigh).
If I run python in terminal using arch -i386 python, and then
from matplotlib.pylab import *
and similar stuff, everything works fine.
I suspect you have the 32-64bit Intel python build -- the 32 bit Intel part overlaps
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
you are probably running 64 bit by default, which would explain that -- MPL is there, but there is no 64 bit Intel binary in the bundle.
Any suggestions are appreciated.
Install the 32 bit binary from python.org -- or you could probably get away with telling eclipe to pass the arch flag when it runs python -- but that feels ugly to me! -Chris -- -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
Sorry for the late answer. But at least for the record: If you are using eclipse, I assume you have also installed the eclipse plugin [pydev](http://pydev.org/). Is use it myself, it's good. Then you have to go to the preferences->pydev->PythonInterpreter and select the python version you want to use by searching for the "Python" executable. I am not familiar with the pre-built versions of matplotlib. Perhaps they miss the 64bit intel versions? Perhaps you can find a lib (.so file) in matplotlib and use the "file" command to see the architectures, it was built for. You should be able to install matplotlib also with `pip install matplotlib`. (if you have pip) Samuel On 26.12.2011, at 06:40, Alex Ter-Sarkissov 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.
Any suggestions are appreciated. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Alex Ter-Sarkissov
-
Chris Barker
-
Samuel John