From: Joe J. <jo...@th...> - 2005-02-13 18:54:57
|
Hi I've just compiled and installed matplotlib 0.71. When I tried some of the example scripts I found that they all segfault. It's "from pylab import *" that does it. I'm working on linux. Here is the output. I have VERBOSE set to true in setup.py and there is more output than I'm showing here. python -c 'from pylab import *' ... ... SeparableTransformation::SeparableTransformation Glyph::init_type FT2Font::init_type font search path ['/usr/share/matplotlib'] ft2font_module::new_ft2font FT2Font::FT2Font FT2Font::clear Segmentation fault If I use gdb to get a stack trace (gdb) where #0 0x408059e9 in FT_Get_Postscript_Name (face=0x8170e98) at ftobjs.c:2457 #1 0x407aa61f in FT2Font (this=0x80f7d60, facefile= {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No data fields>}, _M_p = 0x814ebb4 "/usr/share/matplotlib/VeraIt.ttf"}, static _S_empty_rep_storage = {0, 0, 0, 0}}) at src/ft2font.cpp:96 #2 0x407b5ded in ft2font_module::new_ft2font(Py::Tuple const&) (this=0x811b300, args=@0x20) at Objects.hxx:456 #3 0x407bf1ef in Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string const&, Py::Tuple const&) ( this=0x811b300, name=@0xbfff8e70, args=@0x60) at Extensions.hxx:283 #4 0x407c960e in method_varargs_call_handler (_self_and_name_tuple=0x40858e10, _args=0x4078de8c) at CXX/cxx_extensions.cxx:1238 As this problem looks font related I should mention that there are two versions of freetype2 on my system (Suse 9.0). one in /usr/lib that came with my system, and one in /usr/local that I installed myself. I unistalled the headerfiles and static libs of the one which came with the system. The run time linker is finding the new one, so matplot is compiling and linking against the same version. If someone can give me a clue about this I would be very happy. Joe |
From: Uri N. <Ur...@zo...> - 2006-05-29 05:46:46
|
Hi, =20 I'm using Python 2.4.1, numpy-0.9.8, and matplotlib-0.87.2 on a Windows XP computer. Problem is that any attempt to import pylab results in a crash. Using "python -v", the culprit seems to be the following line: =20 # c:\Python24\lib\site-packages\matplotlib\_transforms.pyc matches c:\Python24\lib\site-packages\matplotlib\_transforms.py import matplotlib._transforms # precompiled from c:\Python24\lib\site-packages\matplotlib\_transforms.pyc Any ideas and solutions to this issue? =20 Cheers, Uri |
From: Charlie M. <cw...@gm...> - 2006-05-29 13:28:07
|
The 0.87.2 release requires numpy-0.9.6. - Charlie On 5/29/06, Uri Nix <Ur...@zo...> wrote: > > > Hi, > > I'm using Python 2.4.1, numpy-0.9.8, and matplotlib-0.87.2 on a Windo= ws > XP computer. > Problem is that any attempt to import pylab results in a crash. > Using "python -v", the culprit seems to be the following line: > > # > c:\Python24\lib\site-packages\matplotlib\_transforms.pyc > matches > c:\Python24\lib\site-packages\matplotlib\_transforms.py > import matplotlib._transforms # precompiled from > c:\Python24\lib\site-packages\matplotlib\_transforms.pyc > > Any ideas and solutions to this issue? > > Cheers, > Uri |
From: John S. <pra...@ho...> - 2009-04-20 16:58:59
|
_______________________________________________ Numpy-discussion mailing list Num...@sc... http://mail.scipy.org/mailman/listinfo/numpy-discussion |
From: Jouni K. S. <jk...@ik...> - 2009-04-20 18:52:35
|
John Seales <pra...@ho...> 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 |
From: John S. <pra...@ho...> - 2009-04-20 20:48:46
|
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: mat...@li... > From: jk...@ik... > Date: Mon, 20 Apr 2009 21:52:04 +0300 > Subject: Re: [Matplotlib-users] can't import pylab > > John Seales <pra...@ho...> 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users _________________________________________________________________ Rediscover Hotmail®: Get quick friend updates right in your inbox. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates2_042009 |
From: John S. <pra...@ho...> - 2009-04-21 21:24:24
|
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: mat...@li... > From: jk...@ik... > Date: Mon, 20 Apr 2009 21:52:04 +0300 > Subject: Re: [Matplotlib-users] can't import pylab > > John Seales <pra...@ho...> 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users 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 |
From: Jouni K. S. <jk...@ik...> - 2009-04-21 07:10:35
|
John Seales <pra...@ho...> writes: > I'm using Mac os 10.4.11. Python is included in mac os. The error messages refer to Python 2.6: >> > 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 If you are somehow using this with the system Python, it's no wonder that you are having problems. I think OS X 10.4 includes Python 2.3 or at most 2.4 - version 10.5 has Python 2.5. But perhaps you have installed some other version of Python - one way to test what you are using is to look at where Python gets its modules: ~% python Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os <module 'os' from '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.pyc'> (So I am using something else than the system-supplied Python, whose os.pyc file is under /System/Library.) Some distributions of Python for OS X are mentioned here: http://matplotlib.sourceforge.net/faq/installing_faq.html#which-python-for-osx > Matplotlib I installed from a precompiled version. Is this the version from Sourceforge, or somewhere else? Anyway, the library linking problems sound a lot like you are using software that was not compiled for your version of OS X - I guess most developers have upgraded to Leopard quite some time ago, so they would not notice if something breaks on older releases. The larger question is, which versions of OS X should be supported by the binary packages? The ReadMe.txt bundled with the MacPython 2.6.2 installer says: This package will install MacPython 2.6.2 for Mac OS X 10.3 or later for the following architecture(s): i386, ppc. So Python itself supports Panther and newer, and I think the compiler flags used by Python are inherited by extensions - but if there is something other than just compiler flags to worry about, someone would have to have an installation of the target version of OS X to test on. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: John S. <pra...@ho...> - 2009-04-23 23:29:31
|
I've been using python 2.6 for several months. I can't remember how I installed it. Matplotlib is from sourceforge. Filename: matplotlib-0.98.5.2-py2.5-mpkg.zip. > To: mat...@li... > From: jk...@ik... > Date: Tue, 21 Apr 2009 10:10:10 +0300 > Subject: [Matplotlib-users] Matplotlib on OS X 10.4 (was: can't import pylab) > > John Seales <pra...@ho...> writes: > > > I'm using Mac os 10.4.11. Python is included in mac os. > > The error messages refer to Python 2.6: > > >> > 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 > > If you are somehow using this with the system Python, it's no wonder > that you are having problems. I think OS X 10.4 includes Python 2.3 or > at most 2.4 - version 10.5 has Python 2.5. But perhaps you have > installed some other version of Python - one way to test what you are > using is to look at where Python gets its modules: > > ~% python > Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) > [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import os > >>> os > <module 'os' from '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.pyc'> > > (So I am using something else than the system-supplied Python, whose > os.pyc file is under /System/Library.) > > Some distributions of Python for OS X are mentioned here: > http://matplotlib.sourceforge.net/faq/installing_faq.html#which-python-for-osx > > > Matplotlib I installed from a precompiled version. > > Is this the version from Sourceforge, or somewhere else? > > Anyway, the library linking problems sound a lot like you are using > software that was not compiled for your version of OS X - I guess most > developers have upgraded to Leopard quite some time ago, so they would > not notice if something breaks on older releases. > > The larger question is, which versions of OS X should be supported by > the binary packages? The ReadMe.txt bundled with the MacPython 2.6.2 > installer says: > > This package will install MacPython 2.6.2 for Mac OS X > 10.3 or later for the following > architecture(s): i386, ppc. > > So Python itself supports Panther and newer, and I think the compiler > flags used by Python are inherited by extensions - but if there is > something other than just compiler flags to worry about, someone would > have to have an installation of the target version of OS X to test on. > > -- > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users _________________________________________________________________ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009 |
From: Jouni K. S. <jk...@ik...> - 2009-04-23 05:57:38
|
John Seales <pra...@ho...> writes: > Anyone have any help to get pylab working? Should I reinstall? What > method should I use? I guess you missed my previous reply asking for more details (I changed the subject so that people who know more about OS X might notice it): http://thread.gmane.org/gmane.comp.python.numeric.general/29635/focus=17135 -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Jouni K. S. <jk...@ik...> - 2009-04-24 04:19:22
|
John Seales <pra...@ho...> writes: > I've been using python 2.6 for several months. I can't remember how I installed it. > Matplotlib is from sourceforge. Filename: matplotlib-0.98.5.2-py2.5-mpkg.zip. That package only works with Python 2.5 (hence "py2.5" in the file name). If you somehow managed to install it into your Python 2.6 hierarchy, that would explain the strange error messages. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: John H. <jdh...@ac...> - 2005-02-13 20:31:48
|
>>>>> "Joe" == Joe Jones <jo...@th...> writes: Joe> As this problem looks font related I should mention that Joe> there are two versions of freetype2 on my system (Suse Joe> 9.0). one in /usr/lib that came with my system, and one in Joe> /usr/local that I installed myself. I unistalled the Joe> headerfiles and static libs of the one which came with the Joe> system. The run time linker is finding the new one, so Joe> matplot is compiling and linking against the same version. Hey Joe, thanks for the detailed info. These kinds of bugs are very hard to track down since I can't replicate them. A few suggestions. rm -rf your "build" sub-directory *and* site-packages/matplotlib and get a clean install to make sure there is no lingering old code linking to the old freetype. Make sure you have a pretty recent freetype (eg >= 2.1.7). What version *are* you using? Once you get matplotlib reinstalled, see if you can replicate the bug. If not, good. If so, send an ldd of site-packages/matplotlib/ft2font.so, and see if you can reproduce the problem with a minimal script, eg from matplotlib.ft2font import FT2Font font = FT2Font('/your/path/to/Vera.ttf') font.set_size(40, 150) font.set_text('finish it', 40) font.draw_glyphs_to_bitmap() fname = 'font.raw' font.write_bitmap(fname) This will take out a lot of the unknowns. The FT2Font constructor does call the FT_Get_Postscript_Name function, which appears to be involved according to your gdb session. Thanks, JDH |
From: Joe J. <jo...@th...> - 2005-02-14 22:09:15
|
On Sunday 13 February 2005 8:21 pm, John Hunter wrote: > Hey Joe, thanks for the detailed info. These kinds of bugs are very > hard to track down since I can't replicate them. A few suggestions. > rm -rf your "build" sub-directory *and* site-packages/matplotlib and > get a clean install to make sure there is no lingering old code > linking to the old freetype. Make sure you have a pretty recent > freetype (eg >= 2.1.7). What version *are* you using? > Hi, thanks for the quick responce. Turns out that this is a bug in gcc. By default freetype builds with the -O2 option, needs to be -O0. Apparently this is fixed in newer versions of gcc, I'm using "3.3.1 (SuSE Linux)". It looks like other programs such as KDE and Mozilla don't tread on this bug. Well, if its true that ldd doesn't lie. Cheers Joe |