From: Tom L. <lo...@as...> - 2005-02-07 16:50:27
|
Hi folks- I have had matplotlib working on OS X (Panther) for a while. However, I haven't used it heavily yet, so I don't know if there are problems hiding under the covers. I do know that I ran many of the demos without any problems, both with TkAgg and wx; of course, those that require GTK would not run. By the way, don't try to get it and scipy to work under Jaguar. I spent several days attempting this, with lots of back and forth with the scipy and macpython list folks, with no luck. The $100 upgrading to Panther was a small price compared to the time lost trying to get it all working on Jaguar. Unfortunately I'm swamped and can't offer any significant assitance with the OS-X binary issue at the moment. But I thought one observation might be useful. Though I have some Fink stuff on my Mac, it is only a few things (xfig and gv are the only Fink things I use). In particular, I believe the version of Freetype that my matplotlib is using is not from Fink, but rather one I installed with the TeX/LaTeX OS X "i-Installer" which can install a number of useful binary packages besides TeX in a pretty painless way (freetype2, jpeg/png/tiff libraries, ghostscript...). There is more about it here: http://www.rna.nl/ii.html I don't think its usefulness beyond TeX is appreciated as well as it should be, though it certainly is confusing to have all these different installation mechanims (OS X package installers, i-Installer packages, setup.py, configure/make...). -Tom |
From: Chris F. <fon...@gm...> - 2005-02-07 17:39:08
|
I am wondering if it would be worthwhile making TkAgg the default backend in an OSX binary, since the current default kills the python process: Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pylab No module named pygtk PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends |
From: John H. <jdh...@ac...> - 2005-02-07 17:52:00
|
>>>>> "Chris" == Chris Fonnesbeck <fon...@gm...> writes: Chris> I am wondering if it would be worthwhile making TkAgg the Chris> default backend in an OSX binary, since the current default Chris> kills the python process: Yes, that is what I do for win32. JDH |
From: Chris B. <Chr...@no...> - 2005-02-07 18:48:01
|
John Hunter wrote: > Chris> I am wondering if it would be worthwhile making TkAgg the > Chris> default backend in an OSX binary, since the current default > Chris> kills the python process: > > Yes, that is what I do for win32. Except that Tk is not installed by default in OS-X either. It is probably more common than GTK, however. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Chris B. <Chr...@no...> - 2005-02-07 23:47:26
|
Chris Fonnesbeck wrote: > On Mon, 07 Feb 2005 10:47:51 -0800, Chris Barker <Chr...@no...> wrote: >>John Hunter wrote >>> Chris> I am wondering if it would be worthwhile making TkAgg the >>> Chris> default backend in an OSX binary, since the current default >>> Chris> kills the python process: >>>Yes, that is what I do for win32. >>Except that Tk is not installed by default in OS-X either. It is >>probably more common than GTK, however. > Right, maybe PS would be a more sensible default, although I'm willing > to bet most users end up using Tk. I'd vote for Agg. Postscript is not the native format on OS-X that it is on other unices. Is there a way to make the default back-end system dependent on install? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: John H. <jdh...@ac...> - 2005-02-08 13:34:42
|
>>>>> "Chris" == Chris Barker <Chr...@no...> writes: Chris> I'd vote for Agg. Postscript is not the native format on Chris> OS-X that it is on other unices. Chris> Is there a way to make the default back-end system Chris> dependent on install? For a src distribution, you could write a postinstall script that does try/except on various GUIs and writes an rc file based on what it finds. This is basically what setup.py does in trying to figure out which backend to build, but doesn't transmit that information to rc -- perhaps it should. Although this would be fairly easy in a src distro, it would be fairly hard in the binary installer which you are trying to build. Alternatively, the backend importer could be a little smarter, and first try the default rc param and then loop over available backends trying to find a match, and issue a verbose report saying "dear newbie, I cannot import your default backend, please see http://blah." but still go ahead and launch something. I have mixed feelings about this -- the more magic we do the more complex it is to debug problems. Also, you have to be careful not to swallow tracebacks, eg pygtk import can fail even if pygtk has been installed on the system, and the user needs to know about this. But I am not totally opposed to it. In fact, I would definitely include it if it was an rc option. Eg, binary package makers like yourself could turn it on since you don't know the user configuration, and src distributors like me could turn it off, assuming people who build their own code can configure it like they like it. Power users want as little magic going on as possible -- new users usually want maximal magic. The function to look at is __init__.py in the main matplotlib tree. Currently we do def get_backend(): return rcParams['backend'] you would want to add an rc param, something like backend : ['TkAgg'] # try these if default fails backend.try = ['GTKAgg, 'WXAgg', 'Agg', 'PS] and then modify get_backend to iterate over these backends, trying to import something to test if it is available, issuing reports if the default backend fails. In the src distro, I always have the option of making backend.try the empty list, which would be the same as the current behavior. and JDH |