Import error on OS X: Reason: image not found

Hi, does anybody know why I'm getting this error importing pylab? Thanks in advance!

Traceback (most recent call last):
   File "/Users/Kates/Documents/ps11.py", line 9, in <module>
     from pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pylab.py", line 1, in <module>
     from matplotlib.pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pylab.py", line 208, in <module>
     from matplotlib import mpl # pulls in most modules
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl.py", line 3, in <module>
     from matplotlib import axis
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.py", line 20, in <module>
     from font_manager import FontProperties
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/font_manager.py", line 40, in <module>
     from matplotlib import ft2font
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
   Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
   Reason: image not found

···

--
Yang Zhang
http://www.mit.edu/~y_z/

It appears that matplotlib is having trouble finding the freetype
dynamic lib in your /usr/X11R6/lib folder when it references it. I'd
check that folder to see if the dylib is there. If it isn't, reinstall
the X11 dev tools. If it is, something is wrong with the dynamic lib
opening, so I'd recommend removing matplotlib from your
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
folder and doing a fresh build/install.

Josh

···

On Wed, Nov 19, 2008 at 9:25 AM, Yang Zhang <yanghatespam@...287...> wrote:

Hi, does anybody know why I'm getting this error importing pylab?
Thanks in advance!

Traceback (most recent call last):
  File "/Users/Kates/Documents/ps11.py", line 9, in <module>
    from pylab import *
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pylab.py",
line 1, in <module>
    from matplotlib.pylab import *
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pylab.py",
line 208, in <module>
    from matplotlib import mpl # pulls in most modules
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl.py",
line 3, in <module>
    from matplotlib import axis
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.py",
line 20, in <module>
    from font_manager import FontProperties
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/font_manager.py",
line 40, in <module>
    from matplotlib import ft2font
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so,
2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
  Referenced from:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
  Reason: image not found

--
Yang Zhang
http://www.mit.edu/~y_z/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users