Hi Matplotlib Users,
First of all, I hope this is the right place to ask my questions, otherwise,
apologies for the spam.
I am trying to install python on my mac (10.6.7) and I have some issues when
trying to import pylab.
I installed python 2.7.1 from the EDP package (32-bit), I have numpy 1.5.0 and
matplotlib 1.0.0.
I can import both numpy and matplotlib successfully (backend is MacOSX, I also
tried TkAgg).
But no matter how I try to import pylab ("import pylab", "from pylab import *",
"ipython -pylab", "from matplotlib import pylab") I always have the following
message:
> >>> import pylab
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/pylab.py",
> line 1, in <module>
> from matplotlib.pylab import *
> File
> "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/pylab.py",
> line 216, in <module>
> from matplotlib import mpl # pulls in most modules
> File
> "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/mpl.py",
> line 2, in <module>
> from matplotlib import axis
> File
> "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/axis.py",
> line 10, in <module>
> import matplotlib.font_manager as font_manager
> File
> "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/font_manager.py",
> line 52, in <module>
> from matplotlib import ft2font
> ImportError:
> dlopen(/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/ft2font.so,
> 2): Library not loaded: @rpath/libfreetype.6.dylib
> Referenced from:
> /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/ft2font.so
> Reason: image not found
Just to be sure, a "which python" returns:
> /Library/Frameworks/Python.framework/Versions/7.0/bin/python
I also checked that I do have the "ft2font.so" file inside
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/.
To me it seems that the library "libfreetype.6.dylib" cannot be found, but I
must confess I have no idea what this @rpath is. Of course, I already tried to
google this but couldn't find a proper solution. A "locate libfreetype.6.dylib"
returns the following:
> /Applications/TeX/TeXworks.app/Contents/Frameworks/libfreetype.6.dylib
> /Applications/VLC.app/Contents/MacOS/lib/libfreetype.6.dylib
> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libfreetype.6.dylib
> /Developer/SDKs/MacOSX10.6.sdk/usr/X11/lib/libfreetype.6.dylib
> /Library/Frameworks/Python.framework/Versions/7.0/lib/libfreetype.6.dylib
> /usr/X11/lib/libfreetype.6.dylib
Using the otool -L to see the different links of the last two files here's what
I have:
> >otool -L
> >/Library/Frameworks/Python.framework/Versions/7.0/lib/libfreetype.6.dylib
> /Library/Frameworks/Python.framework/Versions/7.0/lib/libfreetype.6.dylib:
> @rpath/libfreetype.6.dylib (compatibility version 13.0.0, current
> version 13.2.0)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
> 1.2.3)
> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
> 1.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 111.0.0)
> >otool -L /usr/X11/lib/libfreetype.6.dylib
> /usr/X11/lib/libfreetype.6.dylib:
> /usr/X11/lib/libfreetype.6.dylib (compatibility version 13.0.0, current
> version 13.0.0)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
> 1.2.3)
>
> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
> (compatibility version 1.0.0, current version 44.0.0)
>
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
> (compatibility version 1.0.0, current version 38.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 125.2.1)
>
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> (compatibility version 150.0.0, current version 550.34.0)
And then, I'm completely lost and I have no idea how to proceed. Anyone has an
idea how to solve this ?
Thanks a lot,
Johan
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users