O pylab why do you refuse to import?

note: make sure to include the list, it doesn't look like you did.

John Seales wrote:

Here's what it says:

$ file ft2font.so
ft2font.so: Mach-O universal binary with 2 architectures
ft2font.so (for architecture i386): Mach-O bundle i386
ft2font.so (for architecture ppc): Mach-O bundle ppc

that's right, but now I see that that wasn't the issue anyway:

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

ft2font is relying on libfreetype. I think that's the one that Apple delivers with their X11 (I know I have it, anyway), but I think X11 is an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib'

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared library ppc

so I have it, and it's a ppc lib, which makes sense, as I'm running on a ppc machine.

If you don't have it, probably the easiest thing to do is install Apple's X11 -- otherwise, perhaps MPL should be built against a static libfreetype.

-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...

I do have X11. It looks like there’s a problem with the libfreetype, but I don’t understand what the problem is.

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib)

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386

···

Date: Wed, 6 May 2009 16:55:23 -0700
From: Chris.Barker@…259…
To: matplotlib-users@…431…ists.sourceforge.net
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

note: make sure to include the list, it doesn’t look like you did.

John Seales wrote:

Here’s what it says:

$ file ft2font.so
ft2font.so: Mach-O universal binary with 2 architectures
ft2font.so (for architecture i386): Mach-O bundle i386
ft2font.so (for architecture ppc): Mach-O bundle ppc

that’s right, but now I see that that wasn’t the issue anyway:

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

ft2font is relying on libfreetype. I think that’s the one that Apple
delivers with their X11 (I know I have it, anyway), but I think X11 is
an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib’

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared
library ppc

so I have it, and it’s a ppc lib, which makes sense, as I’m running on a
ppc machine.

If you don’t have it, probably the easiest thing to do is install
Apple’s X11 – otherwise, perhaps MPL should be built against a static
libfreetype.

-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…


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options


Hotmail® goes with you. Get it on your BlackBerry or iPhone.

John,

I've seen this problem happen before with someone else; the person's
X11 installation for some reason included the file
libfreetype.6.3.dylib but not librfreetype.6.3.dylib. Did you install
X11 before or after installing the Xcode development tools? Also, if
you had to install X11 yourself, I'm assuming you're using OS X Tiger
(or at least not 10.5.x)? I'd recommend trying a reinstall of X11 (if
you're not using Leopard) and then Xcode in your situation, but a
quicker workaround is to install freetype yourself (thus putting a
copy in /usr/local) and build matplotlib from source rather than use
the installer package.

Josh

···

On Wed, May 6, 2009 at 5:44 PM, John Seales <praxbaffle@...32...> wrote:

I do have X11. It looks like there's a problem with the libfreetype, but I
don't understand what the problem is.

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open
(/usr/X11R6/lib/libfreetype.6.dylib)

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2
architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O
dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O
dynamically linked shared library i386

Date: Wed, 6 May 2009 16:55:23 -0700
From: Chris.Barker@...259...
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

note: make sure to include the list, it doesn't look like you did.

John Seales wrote:
> Here's what it says:
>
> $ file ft2font.so
> ft2font.so: Mach-O universal binary with 2 architectures
> ft2font.so (for architecture i386): Mach-O bundle i386
> ft2font.so (for architecture ppc): Mach-O bundle ppc

that's right, but now I see that that wasn't the issue anyway:

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

ft2font is relying on libfreetype. I think that's the one that Apple
delivers with their X11 (I know I have it, anyway), but I think X11 is
an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to
`libfreetype.6.3.dylib'

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared
library ppc

so I have it, and it's a ppc lib, which makes sense, as I'm running on a
ppc machine.

If you don't have it, probably the easiest thing to do is install
Apple's X11 -- otherwise, perhaps MPL should be built against a static
libfreetype.

-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...

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

________________________________
Hotmail® goes with you. Get it on your BlackBerry or iPhone.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Victory!

Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found out how to fix it on http://forums.macosxhints.com/archive/index.php/t-98792.html . The new libfreetype, once in the right spot and called libfreetype.6.dylib seems to work.

Thanks, Chris, for helping me.

···

From: praxbaffle@…32…
To: matplotlib-users@lists.sourceforge.net
Date: Wed, 6 May 2009 17:44:12 -0700
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

I do have X11. It looks like there’s a problem with the libfreetype, but I don’t understand what the problem is.

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib)

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386

Date: Wed, 6 May 2009 16:55:23 -0700
From: Chris.Barker@…259…
To: matplotlib-users@…431…ists.sourceforge.net
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

note: make sure to include the list, it doesn’t look like you did.

John Seales wrote:

Here’s what it says:

$ file ft2font.so
ft2font.so: Mach-O universal binary with 2 architectures
ft2font.so (for architecture i386): Mach-O bundle i386
ft2font.so (for architecture ppc): Mach-O bundle ppc

that’s right, but now I see that that wasn’t the issue anyway:

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

ft2font is relying on libfreetype. I think that’s the one that Apple
delivers with their X11 (I know I have it, anyway), but I think X11 is
an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib’

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared
library ppc

so I have it, and it’s a ppc lib, which makes sense, as I’m running on a
ppc machine.

If you don’t have it, probably the easiest thing to do is install
Apple’s X11 – otherwise, perhaps MPL should be built against a static
libfreetype.

-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…


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options


Hotmail® goes with you. Get it on your BlackBerry or iPhone.


Hotmail® has a new way to see what’s up with your friends. Check it out.

Victory!

Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found out how to fix it on http://forums.macosxhints.com/archive/index.php/t-98792.html . The new libfreetype, once in the right spot and called libfreetype.6.dylib seems to work.

Thanks, Chris, for helping me.

···

From: praxbaffle@…32…
To: matplotlib-users@lists.sourceforge.net
Date: Wed, 6 May 2009 17:44:12 -0700
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

I do have X11. It looks like there’s a problem with the libfreetype, but I don’t understand what the problem is.

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib)

john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386

Date: Wed, 6 May 2009 16:55:23 -0700
From: Chris.Barker@…259…
To: matplotlib-users@…431…ists.sourceforge.net
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?

note: make sure to include the list, it doesn’t look like you did.

John Seales wrote:

Here’s what it says:

$ file ft2font.so
ft2font.so: Mach-O universal binary with 2 architectures
ft2font.so (for architecture i386): Mach-O bundle i386
ft2font.so (for architecture ppc): Mach-O bundle ppc

that’s right, but now I see that that wasn’t the issue anyway:

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

ft2font is relying on libfreetype. I think that’s the one that Apple
delivers with their X11 (I know I have it, anyway), but I think X11 is
an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib’

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared
library ppc

so I have it, and it’s a ppc lib, which makes sense, as I’m running on a
ppc machine.

If you don’t have it, probably the easiest thing to do is install
Apple’s X11 – otherwise, perhaps MPL should be built against a static
libfreetype.

-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…


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options


Hotmail® goes with you. Get it on your BlackBerry or iPhone.


Hotmail® goes with you. Get it on your BlackBerry or iPhone.

John Seales wrote:

Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found out how to fix it on Macworld - News, Tips & Reviews from the Apple Experts . The new libfreetype, once in the right spot and called libfreetype.6.dylib seems to work.

If it works, you're probably done, but, for the sake of completeness, what do you get from:

$ ls -l /usr/X11R6/lib/libfreetype*

-rw-r--r-- 1 root wheel 348476 Jan 21 07:27
/usr/X11R6/lib/libfreetype.6.3.dylib

lrwxr-xr-x 1 root wheel 21 Aug 14 2008
/usr/X11R6/lib/libfreetype.6.dylib -> libfreetype.6.3.dylib

-rw-r--r-- 1 root wheel 831260 Mar 23 2007 /usr/X11R6/lib/libfreetype.a

lrwxr-xr-x 1 root wheel 21 Aug 14 2008 /usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib

This is the traditional *nix convention:

the real lib is libfreetype.6.3.dylib (major an minor version specified)

The other ones are links to it.

I suspect that you where missing the libfreetype.6.dylib link before, and that you may now have a full lib there, rather than a link. Which probably is fine, but not quite standard.

-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...

I too have been bit by related freetype problems...

Is there a way of telling matplotlib which freetype dylib to use on OS
X? I have multiple installed and it finds the wrong one by default.
I can probably go and hack on the setup.py/setupext.py to do this but
I am hoping there is any easier way.

Thanks,

Brian

···

On Thu, May 7, 2009 at 9:07 AM, Christopher Barker <Chris.Barker@...259...> wrote:

John Seales wrote:

Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found
out how to fix it on
Macworld - News, Tips & Reviews from the Apple Experts . The new
libfreetype, once in the right spot and called libfreetype.6.dylib seems
to work.

If it works, you're probably done, but, for the sake of completeness,
what do you get from:

$ ls -l /usr/X11R6/lib/libfreetype*

-rw-r--r-- 1 root wheel 348476 Jan 21 07:27
/usr/X11R6/lib/libfreetype.6.3.dylib

lrwxr-xr-x 1 root wheel 21 Aug 14 2008
/usr/X11R6/lib/libfreetype.6.dylib -> libfreetype.6.3.dylib

-rw-r--r-- 1 root wheel 831260 Mar 23 2007 /usr/X11R6/lib/libfreetype.a

lrwxr-xr-x 1 root wheel 21 Aug 14 2008
/usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib

This is the traditional *nix convention:

the real lib is libfreetype.6.3.dylib (major an minor version specified)

The other ones are links to it.

I suspect that you where missing the libfreetype.6.dylib link before,
and that you may now have a full lib there, rather than a link. Which
probably is fine, but not quite standard.

-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...

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Brian Granger wrote:

I too have been bit by related freetype problems...

Is there a way of telling matplotlib which freetype dylib to use on OS
X?

at run time, no. At built time, then:

I can probably go and hack on the setup.py/setupext.py

that's how.

The tough part is that AFAICT, there is no way to specify a particular lib to link to, rather, you specify where to look for libs, so you need to make sure that it's looking where you want before where you don't want.

Ideally, the MPL community would decide on which is the "canonical" choice, and that would be how setup.py would be written. But there are so many options, it's hard to come to consensus.

Personally, I'd like to see the "Kyng Chaos" frameworks be the "standard" basis for python extension binaries:

http://www.kyngchaos.com/software:frameworks

That's a pretty complete set, and would support MPL, PIL, etc, etc....

But it seems folks prefer to do static linking for distributed binaries, which is good too, but a bit tricky, as gcc really prefers to dynamically link -- it's easy to accidentally include a dynamic link without realizing it.

-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...