Can't get pylab to import with Python 2.4 on Mac OS X 10.4.8 on PPC

Thanks in advance to anyone who can help. This is my first extended attempt to make matplotlib work, and I'm relatively new to the whole Python world. I have MacPython2.4 running now, which seems to work fine. I installed everything for matplotlib, scipy, etc., from the Mac OS 10.4 SciPy Superpack binaries, so I didn't expect to have much trouble, but I get the following when I try to import pylab:

>>> from pylab import *
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", line 202, in ?
     from axes import Axes, PolarAxes
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py", line 15, in ?
     from axis import XAxis, YAxis
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py", line 25, in ?
     from font_manager import FontProperties
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py", line 39, in ?
     from matplotlib import ft2font
ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so: Symbol not found: _FMDisposeFontFamilyIterator
   Referenced from: /usr/local/lib/libfreetype.6.dylib
   Expected in: flat namespace

I saw a couple of posts about problems caused by libfreetype in the most recent Apple X11 update, so I tried reinstalling Freetype2 from souce and ended up with libfreetype6.3.10 in my /usr/local/lib. I tried moving this to my /usr/X11R6/lib and resetting the symbolic links to point to this, but no luck.

Any advice?

Thanks,
Chris Pettit

Chris Pettit wrote:

Thanks in advance to anyone who can help. This is my first extended attempt to make matplotlib work, and I'm relatively new to the whole Python world. I have MacPython2.4 running now, which seems to work fine. I installed everything for matplotlib, scipy, etc., from the Mac OS 10.4 SciPy Superpack binaries, so I didn't expect to have much trouble, but I get the following when I try to import pylab:

>>> from pylab import *
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/matplotlib/pylab.py", line 202, in ?
     from axes import Axes, PolarAxes
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/matplotlib/axes.py", line 15, in ?
     from axis import XAxis, YAxis
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/matplotlib/axis.py", line 25, in ?
     from font_manager import FontProperties
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/matplotlib/font_manager.py", line 39, in ?
     from matplotlib import ft2font
ImportError: Failure linking new module: /Library/Frameworks/ Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ ft2font.so: Symbol not found: _FMDisposeFontFamilyIterator
   Referenced from: /usr/local/lib/libfreetype.6.dylib
   Expected in: flat namespace

I saw a couple of posts about problems caused by libfreetype in the most recent Apple X11 update, so I tried reinstalling Freetype2 from souce and ended up with libfreetype6.3.10 in my /usr/local/lib. I tried moving this to my /usr/X11R6/lib and resetting the symbolic links to point to this, but no luck.

Any advice?

Thanks,
Chris Pettit

Chris: Do you have /usr/local/lib/libfreetype.6.dylib? (it should be a symlink to /usr/local/lib/libfreetype.6.3.dylib)
If you do, I imagine that your version of libfreetype is old and doesn't have the _FMDisposeFontFamilyIterator symbol.

You could try setting the /usr/local/lib/libfreetype.6.dylib symlink to point to /usr/X11R6/lib/libfreetype.6.3.x.dylib.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory