freetypelib problem scipy superpack matplotlib

I needed to use some function from scipy. It appeared that the easiest way to install it was to use the scipy superpack

http://idisk.mac.com/fonnesbeck-Public/ScipySuperpack-PPC-10.4-py2.5.zip

After installing ipython --pylab exits with error on startup see below:

It appears to be a freetype problem. I have the macports freetype in

/opt/local/lib/libfreetype.6.dylib

I added a symbolic link in /usr/local/lib to the /opt/local/lib and that fixed the problem

sudo ln -s /opt/local/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib

Since I did not have this problem with the matplotlib on

http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

I wonder why this occurred with scypy super pack? I assume there is a difference in how the two were built

where one could find the free typelib and the other couldn’t

ipython --pylab

loaded rc file /Users/samuel/.matplotlib/matplotlibrc

matplotlib version 0.90.0

verbose.level helpful

interactive is False

units is False

platform is darwin

numerix numpy 1.0.3.dev3728

Traceback (most recent call last):

File “/Library/Frameworks/Python.framework/Versions/Current/bin/ipython”, line 27, in

IPython.Shell.start().mainloop()

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/Shell.py”, line 1111, in start

return shell(user_ns = user_ns)

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/Shell.py”, line 1028, in init

shell_class=MatplotlibMTShell)

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/Shell.py”, line 767, in init

on_kill=[self.wxexit])

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/ipmaker.py”, line 95, in make_IPython

embedded=embedded,**kw)

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/Shell.py”, line 571, in init

user_ns,b2 = self._matplotlib_config(name,user_ns)

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/IPython/Shell.py”, line 463, in _matplotlib_config

from matplotlib import backends

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/init.py”, line 55, in

new_figure_manager, draw_if_interactive, show = pylab_setup()

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/init.py”, line 24, in pylab_setup

globals(),locals(),[backend_name])

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_wxagg.py”, line 21, in

from matplotlib.figure import Figure

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py”, line 7, in

from axes import Axes, Subplot, PolarSubplot, PolarAxes

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py”, line 17, in

from axis import XAxis, YAxis

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.py”, line 25, in

from font_manager import FontProperties

File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/font_manager.py”, line 39, in

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/local/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

···

Samuel M. Smith Ph.D.

2966 Fort Hill Road

Eagle Mountain, Utah 84005-4108

801-768-2768 voice

801-768-2769 fax


"The greatest source of failure and unhappiness in the world is

giving up what we want most for what we want at the moment"


Samuel M. Smith wrote:

I did not have this problem with the matplotlib on
http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

That one was probably built with a statically linked freetype, as the one Apple provides doesn't work with MPL.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Christopher Barker wrote:

Samuel M. Smith wrote:

I did not have this problem with the matplotlib on
http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

That one was probably built with a statically linked freetype, as the
one Apple provides doesn't work with MPL.

No, it was built against a dynamic freetype library which was not included with
the package. If it had been statically linked, there wouldn't be a problem.

···

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
  -- Umberto Eco

So the conclusion is pythonmac matplotlib uses a statically linked freetype so it doesn't look into /usr/local/lib
and Fonnesbeck's scipy superpack matplotlib is using a dynamically linked freetype which is looking into /usr/local/lib

···

On 4 May 2007, at 12:09 , Robert Kern wrote:

Christopher Barker wrote:

Samuel M. Smith wrote:

I did not have this problem with the matplotlib on
http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

That one was probably built with a statically linked freetype, as the
one Apple provides doesn't work with MPL.

No, it was built against a dynamic freetype library which was not included with
the package. If it had been statically linked, there wouldn't be a problem.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
  -- Umberto Eco

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

**********************************************************************
Samuel M. Smith Ph.D.
2966 Fort Hill Road
Eagle Mountain, Utah 84005-4108
801-768-2768 voice
801-768-2769 fax
**********************************************************************
"The greatest source of failure and unhappiness in the world is
giving up what we want most for what we want at the moment"
**********************************************************************

Samuel M. Smith wrote:

So the conclusion is pythonmac matplotlib uses a statically linked
freetype so it doesn't look into /usr/local/lib
and Fonnesbeck's scipy superpack matplotlib is using a dynamically
linked freetype which is looking into /usr/local/lib

Yes.

···

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
  -- Umberto Eco

Robert Kern wrote:

Christopher Barker wrote:

Samuel M. Smith wrote:

I did not have this problem with the matplotlib on
http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

That one was probably built with a statically linked freetype, as the
one Apple provides doesn't work with MPL.

No, it was built against a dynamic freetype library which was not included with
the package. If it had been statically linked, there wouldn't be a problem.

My deepest apologies. I misread your post as referring to the Scipy Superpack
package. You are correct.

···

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
  -- Umberto Eco

Strange. I have libfreetype.a in a staticlibs directory that I link to when building these things. I will try again.

cf

···

On 5/4/07, Christopher Barker <Chris.Barker@…259…> wrote:

Samuel M. Smith wrote:

I did not have this problem with the matplotlib on
http://pythonmac.org/packages/py25-fat/dmg/matplotlib-0.90.0-py2.5-macosx10.4-2007-02-20.dmg

That one was probably built with a statically linked freetype, as the
one Apple provides doesn’t work with MPL.