can't import pylab

John Seales <praxbaffle@...32...> writes:

it's a problem with ft2font. I checked for the existence of the files
it's looking for, the libfreetype.6.dylib, and ft2font.so � they exist
in the places they're supposed to. I don't really know what 'image not
found' exactly means.

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so
  Reason: image not found

What version of OS X are you using? How did you install Python and
Matplotlib - did you get a precompiled version, or install via Fink or
MacPorts, or compile it yourself?

Here's a wild guess: since /usr/X11R6 is just a symlink to /usr/X11, the
file /usr/X11R6/lib/libfreetype.6.dylib has an "install name" of
/usr/X11/lib/libfreetype.6.dylib, and perhaps the dynamic linker doesn't
like the mismatch. Do the following commands fix the problem?

cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib
cp ft2font.so ft2font.so.bak
install_name_tool -change /usr/X11R6/lib/libfreetype.6.dylib \
/usr/X11/lib/libfreetype.6.dylib ft2font.so

If not, copy ft2font.so.bak back over the modified ft2font.so to prevent
the attempted fix from breaking anything else.

···

--
Jouni K. Sepp�nen

I’m using Mac os 10.4.11. Python is included in mac os. Matplotlib I installed from a precompiled version.

I tried doing what you suggest, but it didn’t work. I still can’t import pylab. There’s also a file called libfreetype.6.3.dylib there. I don’t know if that helps.

···

To: matplotlib-users@lists.sourceforge.net
From: jks@…397…
Date: Mon, 20 Apr 2009 21:52:04 +0300
Subject: Re: [Matplotlib-users] can’t import pylab

John Seales <praxbaffle@…2558…> writes:

it’s a problem with ft2font. I checked for the existence of the files
it’s looking for, the libfreetype.6.dylib, and ft2font.so – they exist
in the places they’re supposed to. I don’t really know what ‘image not
found’ exactly means.

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so
Reason: image not found

What version of OS X are you using? How did you install Python and
Matplotlib - did you get a precompiled version, or install via Fink or
MacPorts, or compile it yourself?

Here’s a wild guess: since /usr/X11R6 is just a symlink to /usr/X11, the
file /usr/X11R6/lib/libfreetype.6.dylib has an “install name” of
/usr/X11/lib/libfreetype.6.dylib, and perhaps the dynamic linker doesn’t
like the mismatch. Do the following commands fix the problem?

cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib
cp ft2font.so ft2font.so.bak
install_name_tool -change /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11/lib/libfreetype.6.dylib ft2font.so

If not, copy ft2font.so.bak back over the modified ft2font.so to prevent
the attempted fix from breaking anything else.


Jouni K. Seppänen
http://www.iki.fi/jks


Stay on top of everything new and different, both inside and
around Java ™ technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p


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


Rediscover Hotmail®: Get quick friend updates right in your inbox. Check it out.

Anyone have any help to get pylab working? Should I reinstall? What method should I use?

I'm using Mac os 10.4.11. Python is included in mac os. Matplotlib I installed from a precompiled version.

I tried doing what you suggest, but it didn't work. I still can't import pylab. There's also a file called libfreetype.6.3.dylib there. I don't know if that helps.

To: matplotlib-users@lists.sourceforge.net
From: jks@...397...
Date: Mon, 20 Apr 2009 21:52:04 +0300
Subject: Re: [Matplotlib-users] can't import pylab

John Seales <praxbaffle@...32...> writes:

> it's a problem with ft2font. I checked for the existence of the files
> it's looking for, the libfreetype.6.dylib, and ft2font.so – they exist
> in the places they're supposed to. I don't really know what 'image not
> found' exactly means.

> ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
> Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so
> Reason: image not found

What version of OS X are you using? How did you install Python and
Matplotlib - did you get a precompiled version, or install via Fink or
MacPorts, or compile it yourself?

Here's a wild guess: since /usr/X11R6 is just a symlink to /usr/X11, the
file /usr/X11R6/lib/libfreetype.6.dylib has an "install name" of
/usr/X11/lib/libfreetype.6.dylib, and perhaps the dynamic linker doesn't
like the mismatch. Do the following commands fix the problem?

cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib
cp ft2font.so ft2font.so.bak
install_name_tool -change /usr/X11R6/lib/libfreetype.6.dylib \
/usr/X11/lib/libfreetype.6.dylib ft2font.so

If not, copy ft2font.so.bak back over the modified ft2font.so to prevent
the attempted fix from breaking anything else.

--
Jouni K. Seppänen
http://www.iki.fi/jks

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Rediscover Hotmail®: Get quick friend updates right in your inbox. Check it out.

···

_________________________________________________________________
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009