sent to:  matplotlib-users@lists.sourceforge.net

I'm attempting to install matplotlib under version 10.5 ("Leopard") of  
the Macintosh operating system.

I had an old installation, via Fink, which broke when I (foolishly)  
upgraded from version 10.4 to version 10.5.

In principle, installing matplotlib under 10.5 should be simple,  
because Leopard already includes all of matplotlib's dependencies:
        Python 2.4 (and 2.5)
        numpy
        libpng
        zlib
        freetype
        
In practice, I seem to be running into trouble with freetype.

I built matplotlib version 0.90.1 from source, and installed it in / 
Library/Python/2.5/site-packages

When I run python2.5 and import pylab, the import looks for freetext. 
6.dylib in /sw/lib/freetype219/lib/libfreetype.6.dylib (i.e. the  
broken Fink installation, incompatable with Leopard) which results in  
a bus error. (My reasons for this assertion are given below.)  There's  
a (presumably Leopard-compatable) version of libfreetype.6.dylib in / 
usr/X11/lib/libfreetype.6.dylib

...so, my problem seems to be, how do I get matplotlib to look for  
libfreetype.6.dylib in the right place?

I have tried changing setup.py Specifically, I've replaced
        'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',  
'/usr', '/sw'],
with
        'darwin' : ['/usr/X11', '/usr/X11/lib', '/usr/X11/include', '/usr/X11/ 
include/freetype2', '/usr/local','/usr'],
Which does not solve the problem (does not change anything at all, as  
far as I can tell).

I've not been able to locate an explicit reference to the /sw  
directory anywhere else in setupext.py, or in setup.py

APPENDIX:  why am I convinced that pylab is looking for freetype. 
6.dylib in /sw/lib/freetype219/lib/  ?

First, when I get the bus error, a window pops up saying that Python's  
"unexpected quit" (=crash) may be due to "freetype.6.dylib"

Second, when I click the "report" button in this window, I see many  
pages of debugging info which I don't know how to interpret, but which  
includes this line:
        0x1226000 -  0x1279ff3 +libfreetype.6.dylib ??? (???) /sw/lib/ 
freetype219/lib/libfreetype.6.dylib
        
Third, when I temporarily remove the entire /sw/lib/freetype219  
directory from /sw/lib then run python2.5 and import pylab, I no  
longer get a bus error, but I *do* now get *this* error:
        ImportError: dlopen(/Library/Python/2.5/site-packages/matplotlib/ 
ft2font.so, 2): Library not loaded: /sw/lib/freetype219/lib/ 
libfreetype.6.dylib
   Referenced from: /Library/Python/2.5/site-packages/matplotlib/ 
ft2font.so
   Reason: image not found

I am going to try some monkey business along the lines of
        ln /usr/X11/lib/libfreetype.6.dylib /sw/lib/freetype219/lib/ 
libfreetype.6.dylib
and will let you know the results.  However, even if that works, it's  
a heinous kluge, and probably fragile, too.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to