[GRASS-dev] grass + matplotlib on mac osx snow leopard

William Kyngesburye woklist at kyngchaos.com
Mon Feb 8 10:05:15 EST 2010


I haven't built matplotlib before, but it looks like it linked FreeType statically into ft2font.so.

You normally get an error about a missing architecture if that's the problem.  But in the case of a statically linked library, maybe ft2font.so (matplotlib) is the right arch, but the linked freetype was not.  Because of the way Python modules are linked, you don't get link errors so you don't know until you run it.

Try checking the archs on the freetype used when compiling matplotlib, and check the archs on ft2font.so.  They should have the same archs.

On Feb 8, 2010, at 5:11 AM, Massimo Di Stefano wrote:

> Hi All,
> 
> I'm working on a script to generate graph from grass using matplotlib
> the script works fine on linux , but on osx it works only by command line
> 
> the script is :
> 
> https://svn.osgeo.org/grass/grass-addons/raster/r.ipso
> 
> the error tring to run it on osx is :
> 
> GRASS 7.0.svn (spearfish60):~ > r.ipso.py 
> Traceback (most recent call last):
>  File "/Library/Application Support/GRASS/7.0/Modules/bin/r.ipso.py", line 27, in <module>
>    import matplotlib.pyplot as plt
>  File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/pyplot.py", line 7, in <module>
>    from matplotlib.figure import Figure, figaspect
>  File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/figure.py", line 18, in <module>
>    from axes import Axes, SubplotBase, subplot_class_factory
>  File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py", line 12, in <module>
>    import matplotlib.axis as maxis
>  File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py", line 10, in <module>
>    import matplotlib.font_manager as font_manager
>  File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/font_manager.py", line 52, in <module>
>    from matplotlib import ft2font
> ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File
>  Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so
>  Expected in: flat namespace
> in /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so
> GRASS 7.0.svn (spearfish60):~ > 
> 
> 
> i have the same error in grass64 and 65 too.
> have you any hints about ?
> 
> maybe matplotlib is build on my osx only in 64 bit mode .. and this generate the problems, how to debug ? 
> 
> if (from grass) i start python and try yo import " from matplotlib import ft2font " i have no errors.
> 
> thanks for any suggestion.
> 
> Massimo._______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed robot?

[Marvin]  You think you have problems?  What are you supposed to do if you ARE a maniacally depressed robot?  No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy




More information about the grass-dev mailing list