SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Kacey A. <int...@gm...> - 2008年04月26日 19:25:41
Hello all,
Thanks again for all the help so far -- you guys are great! But presently I
have a (potentially silly) question. So I'm attempting to create a plot of
essentially two lists of data, but would like two x-axes: one along the top
in one length scale, another along the bottom in another length scale. I've
tried manually setting another x-axis at coordinates matching the top side
of the plot box, but that didn't work out so well:
 loglog(wavelength, flux, "ko")
 axis([1, 100, 10000, 1000000])
 a = axes([0.15, 0.95, 0.85, 0.01], frameon=False)
 a.yaxis.set_visible(False)
 a.set_xticklabels(["test1", "test2", "test3"])
(essentially I made another plot set into the larger one and moved it around
until the bottom/x-axis of that plot was along the top of the larger plot...
ugly tickmarks above the tickmark labels, though)
Then I tried the twinx() solution:
 ax1 = subplot(111)
 loglog(wavelength, flux, "ko")
 ax2 = twinx()
 ax2.xaxis.tick_top()
 ax2.set_xticklabels(["test1", "test2", "test3"])
 show()
Problem is, I change the labels of the second x-axis, it changes the labels
of the bottom one, too... I'm essentially trying to have two scales which
are functions of each other, one along the top and the other along the
bottom, but for the same dataset. I've tried scouring all sorts of
documentation and forums but haven't found quite what I'm looking for. Any
help would be much appreciated!
From: Arthur M. G. <am...@ir...> - 2008年04月27日 14:54:11
Hello Matplotlib users,
I'm having difficulty generating postscript, and receiving an error that 
I'm guessing reflects a version conflict, but I'm not sure exactly which 
version of what needs to be changed. If I generate a plot (backend is 
QtAGG, so I get a window), then click on the save button, I get a dialog 
saying:
/path_to/matplotlib/ttconv.so: undefined symbol: 
_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
Alternatively, if I do
import matplotlib; matplotlib.use('PS'); from pylab import *
the result is as follows (essentially the same error):
exceptions.ImportError
Traceback (most recent call last)
/home/amg/<ipython console>
/home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
----> 1 from matplotlib.pylab import *
 2 import matplotlib.pylab
 3 __doc__ = matplotlib.pylab.__doc__
/home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
 290
 291
--> 292 from matplotlib.pyplot import *
 293
 294
/home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
 35
 36 from matplotlib.backends import pylab_setup
---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
 38
 39 def switch_backend(newbackend):
/home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
in pylab_setup()
 22 backend_name = 'backend_'+backend.lower()
 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
---> 24 globals(),locals(),[backend_name])
 25
 26 # Things we pull in from all backends
/home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
 22 from matplotlib.font_manager import findfont, 		 
is_opentype_cff_font
 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
LOAD_NO_HINTING
---> 24 from matplotlib.ttconv import convert_ttf_to_ps
 25 from matplotlib.mathtext import MathTextParser
 26 from matplotlib._mathtext_data import uni2type1
ImportError: 
/home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
(The above backtrace is from iPython, but I get the same thing running 
from plain ol' Python.)
Googling suggests that this might mean I have a version of Matplotlib 
that is too recent for the g++ compiler on my system, but I'm not really 
certain. I'm running as an unprivileged user on RHEL4, with most of the 
necessary libraries already present on the system. I've only had to add 
qt and PyQt, which are installed in my home directory, where Matplotlib 
can apparently find them. Version info is as follows:
These are locally installed:
Python 2.4
qt-3.3.8b
PyQt-3.17.4
Matplotlib-0.91.2
The following were already present:
Kernel: 2.6.9-67.0.1.ELsmp, on i686
glibc-2.3.4-2.39
gcc-3.4.6-9
tcl-8.4.7-2
tk-8.4.7-3.el4_6.1
freetype-2.1.9-6.el4
libpng-1.2.7-3.el4_5.1
zlib-1.2.1.2-1.2
ghostscript-7.07-33.2.el4_6.1
Output of 'gs --version': 8.50
I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
Not sure what other info to supply; suggestions appreciated.
Thanks!
Arthur
-------------------------------
amg -at- iri -dot- columbia -dot- edu
From: Johann Cohen-T. <co...@sl...> - 2008年04月27日 15:20:41
hmm, I did not use matplotlib recently, but looking at the library, I 
would guess that I have the same issue :
[cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
 linux-gate.so.1 => (0x00110000)
 libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
 libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
 libm.so.6 => /lib/libm.so.6 (0x0011f000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
 libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
 libc.so.6 => /lib/libc.so.6 (0x003f3000)
 libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
 libutil.so.1 => /lib/libutil.so.1 (0x00172000)
 /lib/ld-linux.so.2 (0x001a4000)
[cohen@jarrett ~]$ nm 
/usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
 U 
_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
Arthur M. Greene wrote:
> Hello Matplotlib users,
>
> I'm having difficulty generating postscript, and receiving an error that 
> I'm guessing reflects a version conflict, but I'm not sure exactly which 
> version of what needs to be changed. If I generate a plot (backend is 
> QtAGG, so I get a window), then click on the save button, I get a dialog 
> saying:
>
> /path_to/matplotlib/ttconv.so: undefined symbol: 
> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>
> Alternatively, if I do
>
> import matplotlib; matplotlib.use('PS'); from pylab import *
>
> the result is as follows (essentially the same error):
>
> exceptions.ImportError
> Traceback (most recent call last)
>
> /home/amg/<ipython console>
>
> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
> ----> 1 from matplotlib.pylab import *
> 2 import matplotlib.pylab
> 3 __doc__ = matplotlib.pylab.__doc__
>
> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
> 290
> 291
> --> 292 from matplotlib.pyplot import *
> 293
> 294
>
> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
> 35
> 36 from matplotlib.backends import pylab_setup
> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
> 38
> 39 def switch_backend(newbackend):
>
> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
> in pylab_setup()
> 22 backend_name = 'backend_'+backend.lower()
> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
> ---> 24 globals(),locals(),[backend_name])
> 25
> 26 # Things we pull in from all backends
>
> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>
> 22 from matplotlib.font_manager import findfont, 		 
> is_opentype_cff_font
> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
> LOAD_NO_HINTING
> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
> 25 from matplotlib.mathtext import MathTextParser
> 26 from matplotlib._mathtext_data import uni2type1
>
> ImportError: 
> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>
> (The above backtrace is from iPython, but I get the same thing running 
> from plain ol' Python.)
>
> Googling suggests that this might mean I have a version of Matplotlib 
> that is too recent for the g++ compiler on my system, but I'm not really 
> certain. I'm running as an unprivileged user on RHEL4, with most of the 
> necessary libraries already present on the system. I've only had to add 
> qt and PyQt, which are installed in my home directory, where Matplotlib 
> can apparently find them. Version info is as follows:
>
> These are locally installed:
> Python 2.4
> qt-3.3.8b
> PyQt-3.17.4
> Matplotlib-0.91.2
>
> The following were already present:
> Kernel: 2.6.9-67.0.1.ELsmp, on i686
> glibc-2.3.4-2.39
> gcc-3.4.6-9
> tcl-8.4.7-2
> tk-8.4.7-3.el4_6.1
> freetype-2.1.9-6.el4
> libpng-1.2.7-3.el4_5.1
> zlib-1.2.1.2-1.2
> ghostscript-7.07-33.2.el4_6.1
> Output of 'gs --version': 8.50
>
> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>
> Not sure what other info to supply; suggestions appreciated.
>
> Thanks!
>
> Arthur
>
> -------------------------------
> amg -at- iri -dot- columbia -dot- edu
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Johann Cohen-T. <co...@sl...> - 2008年04月27日 16:45:54
Sorry for the preceding mis-threaded version. Here it is again :
I dont know if it is related, but I am actually failing an exemple :
[cohen@jarrett matplotlib]$ ipython examples/pstest.py
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
in <module>()
 2 import matplotlib
 3 matplotlib.use('PS')
----> 4 from pylab import *
 5
 6 def f(t):
/usr/lib/python2.5/site-packages/pylab.py in <module>()
----> 1
 2
 3 from matplotlib.pylab import *
 4 import matplotlib.pylab
 5 __doc__ = matplotlib.pylab.__doc__
/usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
 201 from numpy import ma
 202
--> 203 from matplotlib import mpl # pulls in most modules
 204
 205 # catch more than an import error here, since the src could fail 
too,
/usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
 1
----> 2 from matplotlib import artist
 3 from matplotlib import axis
 4 from matplotlib import axes
 5 from matplotlib import cbook
 6 from matplotlib import collections
/usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
 12 from ticker import NullLocator, FixedLocator, AutoLocator
 13
---> 14 from font_manager import FontProperties
 15 from text import Text, TextWithDash
 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
/usr/lib/python2.5/site-packages/matplotlib/font_manager.py in <module>()
 38 import matplotlib
 39 from matplotlib import afm
---> 40 from matplotlib import ft2font
 41 from matplotlib import rcParams, get_configdir
 42 from matplotlib.cbook import is_string_like
ImportError: /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: 
undefined symbol: inflateReset
My config is :
============================================================================
BUILDING MATPLOTLIB
 matplotlib: 0.98pre
 python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
 4.1.2 20070925 (Red Hat 4.1.2-33)]
 platform: linux2
REQUIRED DEPENDENCIES
 numpy: 1.1.0.dev5077
 freetype2: 9.16.3
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.2.22
 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
 wxPython: 2.8.4.0
 * WxAgg extension not required for wxPython >= 2.8
 Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
 pygobject: 2.14.0
 Qt: Qt: 3.3.8, PyQt: 3.17.4
 Qt4: Qt: 4.3.3, PyQt4: 4.3.3
 Cairo: 1.4.12
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: matplotlib will provide
 pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
 dvipng: 1.5
 ghostscript: 8.61
 latex: 3.141592
EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
 configobj: matplotlib will provide
 enthought.traits: matplotlib will provide
best,
Johann
Johann Cohen-Tanugi wrote:
> hmm, I did not use matplotlib recently, but looking at the library, I 
> would guess that I have the same issue :
> [cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
> linux-gate.so.1 => (0x00110000)
> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
> libm.so.6 => /lib/libm.so.6 (0x0011f000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
> libc.so.6 => /lib/libc.so.6 (0x003f3000)
> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
> /lib/ld-linux.so.2 (0x001a4000)
> [cohen@jarrett ~]$ nm 
> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
> U 
> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>
>
> Arthur M. Greene wrote:
> 
>> Hello Matplotlib users,
>>
>> I'm having difficulty generating postscript, and receiving an error that 
>> I'm guessing reflects a version conflict, but I'm not sure exactly which 
>> version of what needs to be changed. If I generate a plot (backend is 
>> QtAGG, so I get a window), then click on the save button, I get a dialog 
>> saying:
>>
>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>
>> Alternatively, if I do
>>
>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>
>> the result is as follows (essentially the same error):
>>
>> exceptions.ImportError
>> Traceback (most recent call last)
>>
>> /home/amg/<ipython console>
>>
>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>> ----> 1 from matplotlib.pylab import *
>> 2 import matplotlib.pylab
>> 3 __doc__ = matplotlib.pylab.__doc__
>>
>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>> 290
>> 291
>> --> 292 from matplotlib.pyplot import *
>> 293
>> 294
>>
>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>> 35
>> 36 from matplotlib.backends import pylab_setup
>> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
>> 38
>> 39 def switch_backend(newbackend):
>>
>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>> in pylab_setup()
>> 22 backend_name = 'backend_'+backend.lower()
>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>> ---> 24 globals(),locals(),[backend_name])
>> 25
>> 26 # Things we pull in from all backends
>>
>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>
>> 22 from matplotlib.font_manager import findfont, 		 
>> is_opentype_cff_font
>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
>> LOAD_NO_HINTING
>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>> 25 from matplotlib.mathtext import MathTextParser
>> 26 from matplotlib._mathtext_data import uni2type1
>>
>> ImportError: 
>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>
>> (The above backtrace is from iPython, but I get the same thing running 
>> from plain ol' Python.)
>>
>> Googling suggests that this might mean I have a version of Matplotlib 
>> that is too recent for the g++ compiler on my system, but I'm not really 
>> certain. I'm running as an unprivileged user on RHEL4, with most of the 
>> necessary libraries already present on the system. I've only had to add 
>> qt and PyQt, which are installed in my home directory, where Matplotlib 
>> can apparently find them. Version info is as follows:
>>
>> These are locally installed:
>> Python 2.4
>> qt-3.3.8b
>> PyQt-3.17.4
>> Matplotlib-0.91.2
>>
>> The following were already present:
>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>> glibc-2.3.4-2.39
>> gcc-3.4.6-9
>> tcl-8.4.7-2
>> tk-8.4.7-3.el4_6.1
>> freetype-2.1.9-6.el4
>> libpng-1.2.7-3.el4_5.1
>> zlib-1.2.1.2-1.2
>> ghostscript-7.07-33.2.el4_6.1
>> Output of 'gs --version': 8.50
>>
>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>
>> Not sure what other info to supply; suggestions appreciated.
>>
>> Thanks!
>>
>> Arthur
>>
>> -------------------------------
>> amg -at- iri -dot- columbia -dot- edu
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save 100ドル. 
>> Use priority code J8TL2D2. 
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>> 
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Arthur M. G. <am...@ir...> - 2008年04月27日 17:06:13
The replies have been helpful, but I'm still trying to figure out where 
the problem lies, but I have noticed that matplotlib-0.90.1 apparently 
doesn't use ttconv. I have this version installed at home and am able to 
generate poscript without a problem. Are you able to tell which package 
is complaining about the undefined symbol(s)?
If I downgrade (at work) I will probably lose some capabilities, since 
the file size of 0.91.2 is more than twice that of 0.90.1 (!) But I 
would prefer to be able to generate .ps or .eps, even if I lose the 
capability of using LaTeX for plot labels, e.g.
Best wishes,
Arthur
-------------------------------
amg -at- iri -dot- columbia -dot- edu
Johann Cohen-Tanugi wrote:
> Sorry for the preceding mis-threaded version. Here it is again :
> 
> I dont know if it is related, but I am actually failing an exemple :
> [cohen@jarrett matplotlib]$ ipython examples/pstest.py
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call last)
> 
> /home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
> in <module>()
> 2 import matplotlib
> 3 matplotlib.use('PS')
> ----> 4 from pylab import *
> 5
> 6 def f(t):
> 
> /usr/lib/python2.5/site-packages/pylab.py in <module>()
> ----> 1
> 2
> 3 from matplotlib.pylab import *
> 4 import matplotlib.pylab
> 5 __doc__ = matplotlib.pylab.__doc__
> 
> /usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
> 201 from numpy import ma
> 202
> --> 203 from matplotlib import mpl # pulls in most modules
> 204
> 205 # catch more than an import error here, since the src could fail 
> too,
> 
> /usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
> 1
> ----> 2 from matplotlib import artist
> 3 from matplotlib import axis
> 4 from matplotlib import axes
> 5 from matplotlib import cbook
> 6 from matplotlib import collections
> 
> /usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
> 12 from ticker import NullLocator, FixedLocator, AutoLocator
> 13
> ---> 14 from font_manager import FontProperties
> 15 from text import Text, TextWithDash
> 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
> 
> /usr/lib/python2.5/site-packages/matplotlib/font_manager.py in <module>()
> 38 import matplotlib
> 39 from matplotlib import afm
> ---> 40 from matplotlib import ft2font
> 41 from matplotlib import rcParams, get_configdir
> 42 from matplotlib.cbook import is_string_like
> 
> ImportError: /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: 
> undefined symbol: inflateReset
> 
> My config is :
> ============================================================================
> BUILDING MATPLOTLIB
> matplotlib: 0.98pre
> python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
> 4.1.2 20070925 (Red Hat 4.1.2-33)]
> platform: linux2
> 
> REQUIRED DEPENDENCIES
> numpy: 1.1.0.dev5077
> freetype2: 9.16.3
> 
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.22
> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
> wxPython: 2.8.4.0
> * WxAgg extension not required for wxPython >= 2.8
> Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
> pygobject: 2.14.0
> Qt: Qt: 3.3.8, PyQt: 3.17.4
> Qt4: Qt: 4.3.3, PyQt4: 4.3.3
> Cairo: 1.4.12
> 
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
> datetime: present, version unknown
> dateutil: matplotlib will provide
> pytz: matplotlib will provide
> 
> OPTIONAL USETEX DEPENDENCIES
> dvipng: 1.5
> ghostscript: 8.61
> latex: 3.141592
> 
> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
> configobj: matplotlib will provide
> enthought.traits: matplotlib will provide
> 
> best,
> Johann
> 
> 
> 
> Johann Cohen-Tanugi wrote:
>> hmm, I did not use matplotlib recently, but looking at the library, I 
>> would guess that I have the same issue :
>> [cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
>> linux-gate.so.1 => (0x00110000)
>> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
>> libm.so.6 => /lib/libm.so.6 (0x0011f000)
>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
>> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
>> libc.so.6 => /lib/libc.so.6 (0x003f3000)
>> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
>> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
>> /lib/ld-linux.so.2 (0x001a4000)
>> [cohen@jarrett ~]$ nm 
>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>> U 
>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>>
>>
>> Arthur M. Greene wrote:
>> 
>>> Hello Matplotlib users,
>>>
>>> I'm having difficulty generating postscript, and receiving an error that 
>>> I'm guessing reflects a version conflict, but I'm not sure exactly which 
>>> version of what needs to be changed. If I generate a plot (backend is 
>>> QtAGG, so I get a window), then click on the save button, I get a dialog 
>>> saying:
>>>
>>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>
>>> Alternatively, if I do
>>>
>>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>>
>>> the result is as follows (essentially the same error):
>>>
>>> exceptions.ImportError
>>> Traceback (most recent call last)
>>>
>>> /home/amg/<ipython console>
>>>
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>>> ----> 1 from matplotlib.pylab import *
>>> 2 import matplotlib.pylab
>>> 3 __doc__ = matplotlib.pylab.__doc__
>>>
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>>> 290
>>> 291
>>> --> 292 from matplotlib.pyplot import *
>>> 293
>>> 294
>>>
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>>> 35
>>> 36 from matplotlib.backends import pylab_setup
>>> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
>>> 38
>>> 39 def switch_backend(newbackend):
>>>
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>>> in pylab_setup()
>>> 22 backend_name = 'backend_'+backend.lower()
>>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>>> ---> 24 globals(),locals(),[backend_name])
>>> 25
>>> 26 # Things we pull in from all backends
>>>
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>>
>>> 22 from matplotlib.font_manager import findfont, 		 
>>> is_opentype_cff_font
>>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
>>> LOAD_NO_HINTING
>>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>>> 25 from matplotlib.mathtext import MathTextParser
>>> 26 from matplotlib._mathtext_data import uni2type1
>>>
>>> ImportError: 
>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>>> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>
>>> (The above backtrace is from iPython, but I get the same thing running 
>>> from plain ol' Python.)
>>>
>>> Googling suggests that this might mean I have a version of Matplotlib 
>>> that is too recent for the g++ compiler on my system, but I'm not really 
>>> certain. I'm running as an unprivileged user on RHEL4, with most of the 
>>> necessary libraries already present on the system. I've only had to add 
>>> qt and PyQt, which are installed in my home directory, where Matplotlib 
>>> can apparently find them. Version info is as follows:
>>>
>>> These are locally installed:
>>> Python 2.4
>>> qt-3.3.8b
>>> PyQt-3.17.4
>>> Matplotlib-0.91.2
>>>
>>> The following were already present:
>>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>>> glibc-2.3.4-2.39
>>> gcc-3.4.6-9
>>> tcl-8.4.7-2
>>> tk-8.4.7-3.el4_6.1
>>> freetype-2.1.9-6.el4
>>> libpng-1.2.7-3.el4_5.1
>>> zlib-1.2.1.2-1.2
>>> ghostscript-7.07-33.2.el4_6.1
>>> Output of 'gs --version': 8.50
>>>
>>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>>
>>> Not sure what other info to supply; suggestions appreciated.
>>>
>>> Thanks!
>>>
>>> Arthur
>>>
From: Johann Cohen-T. <co...@sl...> - 2008年04月28日 12:28:16
After browsing the web a little, it seems that the matplotlib build of 
ft2font2 is missing the linking of libz.so : if I add it to the command 
line
[cohen@jarrett matplotlib]$ g++ -pthread -shared 
build/temp.linux-i686-2.5/src/ft2font.o 
build/temp.linux-i686-2.5/src/mplutils.o 
build/temp.linux-i686-2.5/CXX/cxxsupport.o 
build/temp.linux-i686-2.5/CXX/cxx_extensions.o 
build/temp.linux-i686-2.5/CXX/IndirectPythonInterface.o 
build/temp.linux-i686-2.5/CXX/cxxextensions.o -L/usr/local/lib 
-L/usr/lib -lstdc++ -lm -lpython2.5 -L/usr/lib -lfreetype _lz -o 
build/lib.linux-i686-2.5/matplotlib/ft2font.so
and then reinstall matplotlib, the problem goes away, id est I can 
import pylab, and the pstest example works. One word on this last 
statement though : as is the pstest example does not open any window to 
show the plots, id est the final show() command does not do anything. 
But if I savefig('pstest'), I can open the pstest.ps resulting file with 
gv and can see the plots. I do not know whether this behavior is 
expected....
So, should I fill a ticket for the inclusion of libz.so at link time of 
ft2font.so?
thanks,
Johann
Arthur M. Greene wrote:
> The replies have been helpful, but I'm still trying to figure out where 
> the problem lies, but I have noticed that matplotlib-0.90.1 apparently 
> doesn't use ttconv. I have this version installed at home and am able to 
> generate poscript without a problem. Are you able to tell which package 
> is complaining about the undefined symbol(s)?
>
> If I downgrade (at work) I will probably lose some capabilities, since 
> the file size of 0.91.2 is more than twice that of 0.90.1 (!) But I 
> would prefer to be able to generate .ps or .eps, even if I lose the 
> capability of using LaTeX for plot labels, e.g.
>
> Best wishes,
>
> Arthur
>
> -------------------------------
> amg -at- iri -dot- columbia -dot- edu
>
>
> Johann Cohen-Tanugi wrote:
> 
>> Sorry for the preceding mis-threaded version. Here it is again :
>>
>> I dont know if it is related, but I am actually failing an exemple :
>> [cohen@jarrett matplotlib]$ ipython examples/pstest.py
>> ---------------------------------------------------------------------------
>> ImportError Traceback (most recent call last)
>>
>> /home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
>> in <module>()
>> 2 import matplotlib
>> 3 matplotlib.use('PS')
>> ----> 4 from pylab import *
>> 5
>> 6 def f(t):
>>
>> /usr/lib/python2.5/site-packages/pylab.py in <module>()
>> ----> 1
>> 2
>> 3 from matplotlib.pylab import *
>> 4 import matplotlib.pylab
>> 5 __doc__ = matplotlib.pylab.__doc__
>>
>> /usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
>> 201 from numpy import ma
>> 202
>> --> 203 from matplotlib import mpl # pulls in most modules
>> 204
>> 205 # catch more than an import error here, since the src could fail 
>> too,
>>
>> /usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
>> 1
>> ----> 2 from matplotlib import artist
>> 3 from matplotlib import axis
>> 4 from matplotlib import axes
>> 5 from matplotlib import cbook
>> 6 from matplotlib import collections
>>
>> /usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
>> 12 from ticker import NullLocator, FixedLocator, AutoLocator
>> 13
>> ---> 14 from font_manager import FontProperties
>> 15 from text import Text, TextWithDash
>> 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
>>
>> /usr/lib/python2.5/site-packages/matplotlib/font_manager.py in <module>()
>> 38 import matplotlib
>> 39 from matplotlib import afm
>> ---> 40 from matplotlib import ft2font
>> 41 from matplotlib import rcParams, get_configdir
>> 42 from matplotlib.cbook import is_string_like
>>
>> ImportError: /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: 
>> undefined symbol: inflateReset
>>
>> My config is :
>> ============================================================================
>> BUILDING MATPLOTLIB
>> matplotlib: 0.98pre
>> python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
>> 4.1.2 20070925 (Red Hat 4.1.2-33)]
>> platform: linux2
>>
>> REQUIRED DEPENDENCIES
>> numpy: 1.1.0.dev5077
>> freetype2: 9.16.3
>>
>> OPTIONAL BACKEND DEPENDENCIES
>> libpng: 1.2.22
>> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
>> wxPython: 2.8.4.0
>> * WxAgg extension not required for wxPython >= 2.8
>> Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
>> pygobject: 2.14.0
>> Qt: Qt: 3.3.8, PyQt: 3.17.4
>> Qt4: Qt: 4.3.3, PyQt4: 4.3.3
>> Cairo: 1.4.12
>>
>> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>> datetime: present, version unknown
>> dateutil: matplotlib will provide
>> pytz: matplotlib will provide
>>
>> OPTIONAL USETEX DEPENDENCIES
>> dvipng: 1.5
>> ghostscript: 8.61
>> latex: 3.141592
>>
>> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
>> configobj: matplotlib will provide
>> enthought.traits: matplotlib will provide
>>
>> best,
>> Johann
>>
>>
>>
>> Johann Cohen-Tanugi wrote:
>> 
>>> hmm, I did not use matplotlib recently, but looking at the library, I 
>>> would guess that I have the same issue :
>>> [cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
>>> linux-gate.so.1 => (0x00110000)
>>> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
>>> libm.so.6 => /lib/libm.so.6 (0x0011f000)
>>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
>>> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
>>> libc.so.6 => /lib/libc.so.6 (0x003f3000)
>>> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
>>> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
>>> /lib/ld-linux.so.2 (0x001a4000)
>>> [cohen@jarrett ~]$ nm 
>>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>> U 
>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>>>
>>>
>>> Arthur M. Greene wrote:
>>> 
>>> 
>>>> Hello Matplotlib users,
>>>>
>>>> I'm having difficulty generating postscript, and receiving an error that 
>>>> I'm guessing reflects a version conflict, but I'm not sure exactly which 
>>>> version of what needs to be changed. If I generate a plot (backend is 
>>>> QtAGG, so I get a window), then click on the save button, I get a dialog 
>>>> saying:
>>>>
>>>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>
>>>> Alternatively, if I do
>>>>
>>>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>>>
>>>> the result is as follows (essentially the same error):
>>>>
>>>> exceptions.ImportError
>>>> Traceback (most recent call last)
>>>>
>>>> /home/amg/<ipython console>
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>>>> ----> 1 from matplotlib.pylab import *
>>>> 2 import matplotlib.pylab
>>>> 3 __doc__ = matplotlib.pylab.__doc__
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>>>> 290
>>>> 291
>>>> --> 292 from matplotlib.pyplot import *
>>>> 293
>>>> 294
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>>>> 35
>>>> 36 from matplotlib.backends import pylab_setup
>>>> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
>>>> 38
>>>> 39 def switch_backend(newbackend):
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>>>> in pylab_setup()
>>>> 22 backend_name = 'backend_'+backend.lower()
>>>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>>>> ---> 24 globals(),locals(),[backend_name])
>>>> 25
>>>> 26 # Things we pull in from all backends
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>>>
>>>> 22 from matplotlib.font_manager import findfont, 		 
>>>> is_opentype_cff_font
>>>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
>>>> LOAD_NO_HINTING
>>>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>>>> 25 from matplotlib.mathtext import MathTextParser
>>>> 26 from matplotlib._mathtext_data import uni2type1
>>>>
>>>> ImportError: 
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>>>> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>
>>>> (The above backtrace is from iPython, but I get the same thing running 
>>>> from plain ol' Python.)
>>>>
>>>> Googling suggests that this might mean I have a version of Matplotlib 
>>>> that is too recent for the g++ compiler on my system, but I'm not really 
>>>> certain. I'm running as an unprivileged user on RHEL4, with most of the 
>>>> necessary libraries already present on the system. I've only had to add 
>>>> qt and PyQt, which are installed in my home directory, where Matplotlib 
>>>> can apparently find them. Version info is as follows:
>>>>
>>>> These are locally installed:
>>>> Python 2.4
>>>> qt-3.3.8b
>>>> PyQt-3.17.4
>>>> Matplotlib-0.91.2
>>>>
>>>> The following were already present:
>>>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>>>> glibc-2.3.4-2.39
>>>> gcc-3.4.6-9
>>>> tcl-8.4.7-2
>>>> tk-8.4.7-3.el4_6.1
>>>> freetype-2.1.9-6.el4
>>>> libpng-1.2.7-3.el4_5.1
>>>> zlib-1.2.1.2-1.2
>>>> ghostscript-7.07-33.2.el4_6.1
>>>> Output of 'gs --version': 8.50
>>>>
>>>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>>>
>>>> Not sure what other info to supply; suggestions appreciated.
>>>>
>>>> Thanks!
>>>>
>>>> Arthur
>>>>
>>>> 
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Michael D. <md...@st...> - 2008年04月28日 20:36:58
Johann Cohen-Tanugi wrote:
> After browsing the web a little, it seems that the matplotlib build of 
> ft2font2 is missing the linking of libz.so : if I add it to the command 
> line
> [cohen@jarrett matplotlib]$ g++ -pthread -shared 
> build/temp.linux-i686-2.5/src/ft2font.o 
> build/temp.linux-i686-2.5/src/mplutils.o 
> build/temp.linux-i686-2.5/CXX/cxxsupport.o 
> build/temp.linux-i686-2.5/CXX/cxx_extensions.o 
> build/temp.linux-i686-2.5/CXX/IndirectPythonInterface.o 
> build/temp.linux-i686-2.5/CXX/cxxextensions.o -L/usr/local/lib 
> -L/usr/lib -lstdc++ -lm -lpython2.5 -L/usr/lib -lfreetype _lz -o 
> build/lib.linux-i686-2.5/matplotlib/ft2font.so
>
> and then reinstall matplotlib, the problem goes away, id est I can 
> import pylab, and the pstest example works. One word on this last 
> statement though : as is the pstest example does not open any window to 
> show the plots, id est the final show() command does not do anything. 
> But if I savefig('pstest'), I can open the pstest.ps resulting file with 
> gv and can see the plots. I do not know whether this behavior is 
> expected....
>
> So, should I fill a ticket for the inclusion of libz.so at link time of 
> ft2font.so?
> 
matplotlib is should already be attempting to dynamically link libz when 
it generates ft2font.so. I wonder why it wasn't for you. Can you 
revert any manual changes, remove the build directory ("build" at the 
top of the source tree), rebuild ("python setup.py build") and attach 
the output to this list?
Cheers,
Mike
> thanks,
> Johann
>
> Arthur M. Greene wrote:
> 
>> The replies have been helpful, but I'm still trying to figure out where 
>> the problem lies, but I have noticed that matplotlib-0.90.1 apparently 
>> doesn't use ttconv. I have this version installed at home and am able to 
>> generate poscript without a problem. Are you able to tell which package 
>> is complaining about the undefined symbol(s)?
>>
>> If I downgrade (at work) I will probably lose some capabilities, since 
>> the file size of 0.91.2 is more than twice that of 0.90.1 (!) But I 
>> would prefer to be able to generate .ps or .eps, even if I lose the 
>> capability of using LaTeX for plot labels, e.g.
>>
>> Best wishes,
>>
>> Arthur
>>
>> -------------------------------
>> amg -at- iri -dot- columbia -dot- edu
>>
>>
>> Johann Cohen-Tanugi wrote:
>> 
>> 
>>> Sorry for the preceding mis-threaded version. Here it is again :
>>>
>>> I dont know if it is related, but I am actually failing an exemple :
>>> [cohen@jarrett matplotlib]$ ipython examples/pstest.py
>>> ---------------------------------------------------------------------------
>>> ImportError Traceback (most recent call last)
>>>
>>> /home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
>>> in <module>()
>>> 2 import matplotlib
>>> 3 matplotlib.use('PS')
>>> ----> 4 from pylab import *
>>> 5
>>> 6 def f(t):
>>>
>>> /usr/lib/python2.5/site-packages/pylab.py in <module>()
>>> ----> 1
>>> 2
>>> 3 from matplotlib.pylab import *
>>> 4 import matplotlib.pylab
>>> 5 __doc__ = matplotlib.pylab.__doc__
>>>
>>> /usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
>>> 201 from numpy import ma
>>> 202
>>> --> 203 from matplotlib import mpl # pulls in most modules
>>> 204
>>> 205 # catch more than an import error here, since the src could fail 
>>> too,
>>>
>>> /usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
>>> 1
>>> ----> 2 from matplotlib import artist
>>> 3 from matplotlib import axis
>>> 4 from matplotlib import axes
>>> 5 from matplotlib import cbook
>>> 6 from matplotlib import collections
>>>
>>> /usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
>>> 12 from ticker import NullLocator, FixedLocator, AutoLocator
>>> 13
>>> ---> 14 from font_manager import FontProperties
>>> 15 from text import Text, TextWithDash
>>> 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
>>>
>>> /usr/lib/python2.5/site-packages/matplotlib/font_manager.py in <module>()
>>> 38 import matplotlib
>>> 39 from matplotlib import afm
>>> ---> 40 from matplotlib import ft2font
>>> 41 from matplotlib import rcParams, get_configdir
>>> 42 from matplotlib.cbook import is_string_like
>>>
>>> ImportError: /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: 
>>> undefined symbol: inflateReset
>>>
>>> My config is :
>>> ============================================================================
>>> BUILDING MATPLOTLIB
>>> matplotlib: 0.98pre
>>> python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
>>> 4.1.2 20070925 (Red Hat 4.1.2-33)]
>>> platform: linux2
>>>
>>> REQUIRED DEPENDENCIES
>>> numpy: 1.1.0.dev5077
>>> freetype2: 9.16.3
>>>
>>> OPTIONAL BACKEND DEPENDENCIES
>>> libpng: 1.2.22
>>> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
>>> wxPython: 2.8.4.0
>>> * WxAgg extension not required for wxPython >= 2.8
>>> Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
>>> pygobject: 2.14.0
>>> Qt: Qt: 3.3.8, PyQt: 3.17.4
>>> Qt4: Qt: 4.3.3, PyQt4: 4.3.3
>>> Cairo: 1.4.12
>>>
>>> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>>> datetime: present, version unknown
>>> dateutil: matplotlib will provide
>>> pytz: matplotlib will provide
>>>
>>> OPTIONAL USETEX DEPENDENCIES
>>> dvipng: 1.5
>>> ghostscript: 8.61
>>> latex: 3.141592
>>>
>>> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
>>> configobj: matplotlib will provide
>>> enthought.traits: matplotlib will provide
>>>
>>> best,
>>> Johann
>>>
>>>
>>>
>>> Johann Cohen-Tanugi wrote:
>>> 
>>> 
>>>> hmm, I did not use matplotlib recently, but looking at the library, I 
>>>> would guess that I have the same issue :
>>>> [cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
>>>> linux-gate.so.1 => (0x00110000)
>>>> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
>>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
>>>> libm.so.6 => /lib/libm.so.6 (0x0011f000)
>>>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
>>>> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
>>>> libc.so.6 => /lib/libc.so.6 (0x003f3000)
>>>> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
>>>> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
>>>> /lib/ld-linux.so.2 (0x001a4000)
>>>> [cohen@jarrett ~]$ nm 
>>>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>> U 
>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>>>>
>>>>
>>>> Arthur M. Greene wrote:
>>>> 
>>>> 
>>>> 
>>>>> Hello Matplotlib users,
>>>>>
>>>>> I'm having difficulty generating postscript, and receiving an error that 
>>>>> I'm guessing reflects a version conflict, but I'm not sure exactly which 
>>>>> version of what needs to be changed. If I generate a plot (backend is 
>>>>> QtAGG, so I get a window), then click on the save button, I get a dialog 
>>>>> saying:
>>>>>
>>>>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>>
>>>>> Alternatively, if I do
>>>>>
>>>>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>>>>
>>>>> the result is as follows (essentially the same error):
>>>>>
>>>>> exceptions.ImportError
>>>>> Traceback (most recent call last)
>>>>>
>>>>> /home/amg/<ipython console>
>>>>>
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>>>>> ----> 1 from matplotlib.pylab import *
>>>>> 2 import matplotlib.pylab
>>>>> 3 __doc__ = matplotlib.pylab.__doc__
>>>>>
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>>>>> 290
>>>>> 291
>>>>> --> 292 from matplotlib.pyplot import *
>>>>> 293
>>>>> 294
>>>>>
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>>>>> 35
>>>>> 36 from matplotlib.backends import pylab_setup
>>>>> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
>>>>> 38
>>>>> 39 def switch_backend(newbackend):
>>>>>
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>>>>> in pylab_setup()
>>>>> 22 backend_name = 'backend_'+backend.lower()
>>>>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>>>>> ---> 24 globals(),locals(),[backend_name])
>>>>> 25
>>>>> 26 # Things we pull in from all backends
>>>>>
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>>>>
>>>>> 22 from matplotlib.font_manager import findfont, 		 
>>>>> is_opentype_cff_font
>>>>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
>>>>> LOAD_NO_HINTING
>>>>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>>>>> 25 from matplotlib.mathtext import MathTextParser
>>>>> 26 from matplotlib._mathtext_data import uni2type1
>>>>>
>>>>> ImportError: 
>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>>>>> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>>
>>>>> (The above backtrace is from iPython, but I get the same thing running 
>>>>> from plain ol' Python.)
>>>>>
>>>>> Googling suggests that this might mean I have a version of Matplotlib 
>>>>> that is too recent for the g++ compiler on my system, but I'm not really 
>>>>> certain. I'm running as an unprivileged user on RHEL4, with most of the 
>>>>> necessary libraries already present on the system. I've only had to add 
>>>>> qt and PyQt, which are installed in my home directory, where Matplotlib 
>>>>> can apparently find them. Version info is as follows:
>>>>>
>>>>> These are locally installed:
>>>>> Python 2.4
>>>>> qt-3.3.8b
>>>>> PyQt-3.17.4
>>>>> Matplotlib-0.91.2
>>>>>
>>>>> The following were already present:
>>>>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>>>>> glibc-2.3.4-2.39
>>>>> gcc-3.4.6-9
>>>>> tcl-8.4.7-2
>>>>> tk-8.4.7-3.el4_6.1
>>>>> freetype-2.1.9-6.el4
>>>>> libpng-1.2.7-3.el4_5.1
>>>>> zlib-1.2.1.2-1.2
>>>>> ghostscript-7.07-33.2.el4_6.1
>>>>> Output of 'gs --version': 8.50
>>>>>
>>>>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>>>>
>>>>> Not sure what other info to supply; suggestions appreciated.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Arthur
>>>>>
>>>>> 
>>>>> 
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save 100ドル. 
>> Use priority code J8TL2D2. 
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>> 
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2008年04月28日 20:40:21
Arthur M. Greene wrote:
> The replies have been helpful, but I'm still trying to figure out where 
> the problem lies, but I have noticed that matplotlib-0.90.1 apparently 
> doesn't use ttconv. 
That is correct. ttconv is a tool to convert and subset Truetype fonts 
to Postscript fonts for embedding in Postscript files.
> I have this version installed at home and am able to 
> generate poscript without a problem. Are you able to tell which package 
> is complaining about the undefined symbol(s)?
> 
The undefined symbols you get are from the C++ standard library. These 
sorts of messages are very common when you compile something on one 
version of gcc (libg++) and then run on a machine with another version 
of libg++. Did you obtain binaries for matplotlib 0.91.2 somewhere, or 
did you compile from source?
> If I downgrade (at work) I will probably lose some capabilities, since 
> the file size of 0.91.2 is more than twice that of 0.90.1 (!)
I suspect most of the file size difference is due to the inclusion of 
the STIX math fonts. There weren't huge amounts of code added between 
0.90 and 0.91.
Cheers,
Mike
> But I 
> would prefer to be able to generate .ps or .eps, even if I lose the 
> capability of using LaTeX for plot labels, e.g.
>
> Best wishes,
>
> Arthur
>
> -------------------------------
> amg -at- iri -dot- columbia -dot- edu
>
>
> Johann Cohen-Tanugi wrote:
> 
>> Sorry for the preceding mis-threaded version. Here it is again :
>>
>> I dont know if it is related, but I am actually failing an exemple :
>> [cohen@jarrett matplotlib]$ ipython examples/pstest.py
>> ---------------------------------------------------------------------------
>> ImportError Traceback (most recent call last)
>>
>> /home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
>> in <module>()
>> 2 import matplotlib
>> 3 matplotlib.use('PS')
>> ----> 4 from pylab import *
>> 5
>> 6 def f(t):
>>
>> /usr/lib/python2.5/site-packages/pylab.py in <module>()
>> ----> 1
>> 2
>> 3 from matplotlib.pylab import *
>> 4 import matplotlib.pylab
>> 5 __doc__ = matplotlib.pylab.__doc__
>>
>> /usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
>> 201 from numpy import ma
>> 202
>> --> 203 from matplotlib import mpl # pulls in most modules
>> 204
>> 205 # catch more than an import error here, since the src could fail 
>> too,
>>
>> /usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
>> 1
>> ----> 2 from matplotlib import artist
>> 3 from matplotlib import axis
>> 4 from matplotlib import axes
>> 5 from matplotlib import cbook
>> 6 from matplotlib import collections
>>
>> /usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
>> 12 from ticker import NullLocator, FixedLocator, AutoLocator
>> 13
>> ---> 14 from font_manager import FontProperties
>> 15 from text import Text, TextWithDash
>> 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
>>
>> /usr/lib/python2.5/site-packages/matplotlib/font_manager.py in <module>()
>> 38 import matplotlib
>> 39 from matplotlib import afm
>> ---> 40 from matplotlib import ft2font
>> 41 from matplotlib import rcParams, get_configdir
>> 42 from matplotlib.cbook import is_string_like
>>
>> ImportError: /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: 
>> undefined symbol: inflateReset
>>
>> My config is :
>> ============================================================================
>> BUILDING MATPLOTLIB
>> matplotlib: 0.98pre
>> python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
>> 4.1.2 20070925 (Red Hat 4.1.2-33)]
>> platform: linux2
>>
>> REQUIRED DEPENDENCIES
>> numpy: 1.1.0.dev5077
>> freetype2: 9.16.3
>>
>> OPTIONAL BACKEND DEPENDENCIES
>> libpng: 1.2.22
>> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
>> wxPython: 2.8.4.0
>> * WxAgg extension not required for wxPython >= 2.8
>> Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
>> pygobject: 2.14.0
>> Qt: Qt: 3.3.8, PyQt: 3.17.4
>> Qt4: Qt: 4.3.3, PyQt4: 4.3.3
>> Cairo: 1.4.12
>>
>> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>> datetime: present, version unknown
>> dateutil: matplotlib will provide
>> pytz: matplotlib will provide
>>
>> OPTIONAL USETEX DEPENDENCIES
>> dvipng: 1.5
>> ghostscript: 8.61
>> latex: 3.141592
>>
>> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
>> configobj: matplotlib will provide
>> enthought.traits: matplotlib will provide
>>
>> best,
>> Johann
>>
>>
>>
>> Johann Cohen-Tanugi wrote:
>> 
>>> hmm, I did not use matplotlib recently, but looking at the library, I 
>>> would guess that I have the same issue :
>>> [cohen@jarrett ~]$ ldd /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
>>> linux-gate.so.1 => (0x00110000)
>>> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
>>> libm.so.6 => /lib/libm.so.6 (0x0011f000)
>>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
>>> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
>>> libc.so.6 => /lib/libc.so.6 (0x003f3000)
>>> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
>>> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
>>> /lib/ld-linux.so.2 (0x001a4000)
>>> [cohen@jarrett ~]$ nm 
>>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>> U 
>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>>>
>>>
>>> Arthur M. Greene wrote:
>>> 
>>> 
>>>> Hello Matplotlib users,
>>>>
>>>> I'm having difficulty generating postscript, and receiving an error that 
>>>> I'm guessing reflects a version conflict, but I'm not sure exactly which 
>>>> version of what needs to be changed. If I generate a plot (backend is 
>>>> QtAGG, so I get a window), then click on the save button, I get a dialog 
>>>> saying:
>>>>
>>>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>
>>>> Alternatively, if I do
>>>>
>>>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>>>
>>>> the result is as follows (essentially the same error):
>>>>
>>>> exceptions.ImportError
>>>> Traceback (most recent call last)
>>>>
>>>> /home/amg/<ipython console>
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>>>> ----> 1 from matplotlib.pylab import *
>>>> 2 import matplotlib.pylab
>>>> 3 __doc__ = matplotlib.pylab.__doc__
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>>>> 290
>>>> 291
>>>> --> 292 from matplotlib.pyplot import *
>>>> 293
>>>> 294
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>>>> 35
>>>> 36 from matplotlib.backends import pylab_setup
>>>> ---> 37 new_figure_manager, draw_if_interactive, show = pylab_setup()
>>>> 38
>>>> 39 def switch_backend(newbackend):
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>>>> in pylab_setup()
>>>> 22 backend_name = 'backend_'+backend.lower()
>>>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>>>> ---> 24 globals(),locals(),[backend_name])
>>>> 25
>>>> 26 # Things we pull in from all backends
>>>>
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>>>
>>>> 22 from matplotlib.font_manager import findfont, 		 
>>>> is_opentype_cff_font
>>>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 		 
>>>> LOAD_NO_HINTING
>>>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>>>> 25 from matplotlib.mathtext import MathTextParser
>>>> 26 from matplotlib._mathtext_data import uni2type1
>>>>
>>>> ImportError: 
>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>>>> undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>
>>>> (The above backtrace is from iPython, but I get the same thing running 
>>>> from plain ol' Python.)
>>>>
>>>> Googling suggests that this might mean I have a version of Matplotlib 
>>>> that is too recent for the g++ compiler on my system, but I'm not really 
>>>> certain. I'm running as an unprivileged user on RHEL4, with most of the 
>>>> necessary libraries already present on the system. I've only had to add 
>>>> qt and PyQt, which are installed in my home directory, where Matplotlib 
>>>> can apparently find them. Version info is as follows:
>>>>
>>>> These are locally installed:
>>>> Python 2.4
>>>> qt-3.3.8b
>>>> PyQt-3.17.4
>>>> Matplotlib-0.91.2
>>>>
>>>> The following were already present:
>>>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>>>> glibc-2.3.4-2.39
>>>> gcc-3.4.6-9
>>>> tcl-8.4.7-2
>>>> tk-8.4.7-3.el4_6.1
>>>> freetype-2.1.9-6.el4
>>>> libpng-1.2.7-3.el4_5.1
>>>> zlib-1.2.1.2-1.2
>>>> ghostscript-7.07-33.2.el4_6.1
>>>> Output of 'gs --version': 8.50
>>>>
>>>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>>>
>>>> Not sure what other info to supply; suggestions appreciated.
>>>>
>>>> Thanks!
>>>>
>>>> Arthur
>>>>
>>>> 
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Johann Cohen-T. <co...@sl...> - 2008年04月28日 21:01:23
Attachments: build.log
Hi Michael,
ok, here it is attached. For completion, from the matplotlib directory, 
I issued :
[cohen@jarrett matplotlib]$ \rm -rf build
[cohen@jarrett matplotlib]$ python setup.py build > build.log
The following was printed out to the screen and not redirected :
src/backend_agg.cpp: In member function ‘Py::Object 
RendererAgg::write_rgba(const Py::Tuple&)’:
src/backend_agg.cpp:1303: warning: ignoring return value of ‘size_t 
fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute 
warn_unused_result
src/backend_agg.cpp:1308: warning: ignoring return value of ‘size_t 
fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute 
warn_unused_result
lib/enthought/traits/ctraits.c: In function ‘_trait_cast’:
lib/enthought/traits/ctraits.c:2370: warning: format ‘%lu’ expects type 
‘long unsigned int’, but argument 3 has type ‘Py_ssize_t’
I have revision 5087 of matplotlib. In the log you can see that libz is 
linked against for the backends, but not for ft2font......
Best,
Johann
Michael Droettboom wrote:
> Johann Cohen-Tanugi wrote:
>> After browsing the web a little, it seems that the matplotlib build 
>> of ft2font2 is missing the linking of libz.so : if I add it to the 
>> command line
>> [cohen@jarrett matplotlib]$ g++ -pthread -shared 
>> build/temp.linux-i686-2.5/src/ft2font.o 
>> build/temp.linux-i686-2.5/src/mplutils.o 
>> build/temp.linux-i686-2.5/CXX/cxxsupport.o 
>> build/temp.linux-i686-2.5/CXX/cxx_extensions.o 
>> build/temp.linux-i686-2.5/CXX/IndirectPythonInterface.o 
>> build/temp.linux-i686-2.5/CXX/cxxextensions.o -L/usr/local/lib 
>> -L/usr/lib -lstdc++ -lm -lpython2.5 -L/usr/lib -lfreetype _lz -o 
>> build/lib.linux-i686-2.5/matplotlib/ft2font.so
>>
>> and then reinstall matplotlib, the problem goes away, id est I can 
>> import pylab, and the pstest example works. One word on this last 
>> statement though : as is the pstest example does not open any window 
>> to show the plots, id est the final show() command does not do 
>> anything. But if I savefig('pstest'), I can open the pstest.ps 
>> resulting file with gv and can see the plots. I do not know whether 
>> this behavior is expected....
>>
>> So, should I fill a ticket for the inclusion of libz.so at link time 
>> of ft2font.so?
> matplotlib is should already be attempting to dynamically link libz 
> when it generates ft2font.so. I wonder why it wasn't for you. Can you 
> revert any manual changes, remove the build directory ("build" at the 
> top of the source tree), rebuild ("python setup.py build") and attach 
> the output to this list?
>
> Cheers,
> Mike
>> thanks,
>> Johann
>>
>> Arthur M. Greene wrote:
>>> The replies have been helpful, but I'm still trying to figure out 
>>> where the problem lies, but I have noticed that matplotlib-0.90.1 
>>> apparently doesn't use ttconv. I have this version installed at home 
>>> and am able to generate poscript without a problem. Are you able to 
>>> tell which package is complaining about the undefined symbol(s)?
>>>
>>> If I downgrade (at work) I will probably lose some capabilities, 
>>> since the file size of 0.91.2 is more than twice that of 0.90.1 (!) 
>>> But I would prefer to be able to generate .ps or .eps, even if I 
>>> lose the capability of using LaTeX for plot labels, e.g.
>>>
>>> Best wishes,
>>>
>>> Arthur
>>>
>>> -------------------------------
>>> amg -at- iri -dot- columbia -dot- edu
>>>
>>>
>>> Johann Cohen-Tanugi wrote:
>>>> Sorry for the preceding mis-threaded version. Here it is again :
>>>>
>>>> I dont know if it is related, but I am actually failing an exemple :
>>>> [cohen@jarrett matplotlib]$ ipython examples/pstest.py
>>>> --------------------------------------------------------------------------- 
>>>>
>>>> ImportError Traceback (most recent call last)
>>>>
>>>> /home/cohen/data1/sources/python/matplotlib-svn/matplotlib/examples/pstest.py 
>>>> in <module>()
>>>> 2 import matplotlib
>>>> 3 matplotlib.use('PS')
>>>> ----> 4 from pylab import *
>>>> 5
>>>> 6 def f(t):
>>>>
>>>> /usr/lib/python2.5/site-packages/pylab.py in <module>()
>>>> ----> 1
>>>> 2
>>>> 3 from matplotlib.pylab import *
>>>> 4 import matplotlib.pylab
>>>> 5 __doc__ = matplotlib.pylab.__doc__
>>>>
>>>> /usr/lib/python2.5/site-packages/matplotlib/pylab.py in <module>()
>>>> 201 from numpy import ma
>>>> 202
>>>> --> 203 from matplotlib import mpl # pulls in most modules
>>>> 204
>>>> 205 # catch more than an import error here, since the src could 
>>>> fail too,
>>>>
>>>> /usr/lib/python2.5/site-packages/matplotlib/mpl.py in <module>()
>>>> 1
>>>> ----> 2 from matplotlib import artist
>>>> 3 from matplotlib import axis
>>>> 4 from matplotlib import axes
>>>> 5 from matplotlib import cbook
>>>> 6 from matplotlib import collections
>>>>
>>>> /usr/lib/python2.5/site-packages/matplotlib/axis.py in <module>()
>>>> 12 from ticker import NullLocator, FixedLocator, AutoLocator
>>>> 13
>>>> ---> 14 from font_manager import FontProperties
>>>> 15 from text import Text, TextWithDash
>>>> 16 from transforms import Affine2D, Bbox, blended_transform_factory, \
>>>>
>>>> /usr/lib/python2.5/site-packages/matplotlib/font_manager.py in 
>>>> <module>()
>>>> 38 import matplotlib
>>>> 39 from matplotlib import afm
>>>> ---> 40 from matplotlib import ft2font
>>>> 41 from matplotlib import rcParams, get_configdir
>>>> 42 from matplotlib.cbook import is_string_like
>>>>
>>>> ImportError: 
>>>> /usr/lib/python2.5/site-packages/matplotlib/ft2font.so: undefined 
>>>> symbol: inflateReset
>>>>
>>>> My config is :
>>>> ============================================================================ 
>>>>
>>>> BUILDING MATPLOTLIB
>>>> matplotlib: 0.98pre
>>>> python: 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) [GCC
>>>> 4.1.2 20070925 (Red Hat 4.1.2-33)]
>>>> platform: linux2
>>>>
>>>> REQUIRED DEPENDENCIES
>>>> numpy: 1.1.0.dev5077
>>>> freetype2: 9.16.3
>>>>
>>>> OPTIONAL BACKEND DEPENDENCIES
>>>> libpng: 1.2.22
>>>> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
>>>> wxPython: 2.8.4.0
>>>> * WxAgg extension not required for wxPython >= 2.8
>>>> Gtk+: gtk+: 2.12.5, glib: 2.14.6, pygtk: 2.12.0,
>>>> pygobject: 2.14.0
>>>> Qt: Qt: 3.3.8, PyQt: 3.17.4
>>>> Qt4: Qt: 4.3.3, PyQt4: 4.3.3
>>>> Cairo: 1.4.12
>>>>
>>>> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>>>> datetime: present, version unknown
>>>> dateutil: matplotlib will provide
>>>> pytz: matplotlib will provide
>>>>
>>>> OPTIONAL USETEX DEPENDENCIES
>>>> dvipng: 1.5
>>>> ghostscript: 8.61
>>>> latex: 3.141592
>>>>
>>>> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
>>>> configobj: matplotlib will provide
>>>> enthought.traits: matplotlib will provide
>>>>
>>>> best,
>>>> Johann
>>>>
>>>>
>>>>
>>>> Johann Cohen-Tanugi wrote:
>>>>> hmm, I did not use matplotlib recently, but looking at the 
>>>>> library, I would guess that I have the same issue :
>>>>> [cohen@jarrett ~]$ ldd 
>>>>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so
>>>>> linux-gate.so.1 => (0x00110000)
>>>>> libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x001c1000)
>>>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00308000)
>>>>> libm.so.6 => /lib/libm.so.6 (0x0011f000)
>>>>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00148000)
>>>>> libpthread.so.0 => /lib/libpthread.so.0 (0x00154000)
>>>>> libc.so.6 => /lib/libc.so.6 (0x003f3000)
>>>>> libdl.so.2 => /lib/libdl.so.2 (0x0016d000)
>>>>> libutil.so.1 => /lib/libutil.so.1 (0x00172000)
>>>>> /lib/ld-linux.so.2 (0x001a4000)
>>>>> [cohen@jarrett ~]$ nm 
>>>>> /usr/lib/python2.5/site-packages/matplotlib/ttconv.so | grep 
>>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>> U _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4
>>>>>
>>>>>
>>>>> Arthur M. Greene wrote:
>>>>>> Hello Matplotlib users,
>>>>>>
>>>>>> I'm having difficulty generating postscript, and receiving an 
>>>>>> error that I'm guessing reflects a version conflict, but I'm not 
>>>>>> sure exactly which version of what needs to be changed. If I 
>>>>>> generate a plot (backend is QtAGG, so I get a window), then click 
>>>>>> on the save button, I get a dialog saying:
>>>>>>
>>>>>> /path_to/matplotlib/ttconv.so: undefined symbol: 
>>>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>>>
>>>>>> Alternatively, if I do
>>>>>>
>>>>>> import matplotlib; matplotlib.use('PS'); from pylab import *
>>>>>>
>>>>>> the result is as follows (essentially the same error):
>>>>>>
>>>>>> exceptions.ImportError
>>>>>> Traceback (most recent call last)
>>>>>>
>>>>>> /home/amg/<ipython console>
>>>>>>
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/pylab.py
>>>>>> ----> 1 from matplotlib.pylab import *
>>>>>> 2 import matplotlib.pylab
>>>>>> 3 __doc__ = matplotlib.pylab.__doc__
>>>>>>
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pylab.py
>>>>>> 290
>>>>>> 291
>>>>>> --> 292 from matplotlib.pyplot import *
>>>>>> 293
>>>>>> 294
>>>>>>
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/pyplot.py
>>>>>> 35
>>>>>> 36 from matplotlib.backends import pylab_setup
>>>>>> ---> 37 new_figure_manager, draw_if_interactive, show = 
>>>>>> pylab_setup()
>>>>>> 38
>>>>>> 39 def switch_backend(newbackend):
>>>>>>
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/__init__.py 
>>>>>> in pylab_setup()
>>>>>> 22 backend_name = 'backend_'+backend.lower()
>>>>>> 23 backend_mod = __import__('matplotlib.backends.'+backend_name,
>>>>>> ---> 24 globals(),locals(),[backend_name])
>>>>>> 25
>>>>>> 26 # Things we pull in from all backends
>>>>>>
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 
>>>>>>
>>>>>> 22 from matplotlib.font_manager import findfont, 
>>>>>> is_opentype_cff_font
>>>>>> 23 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, 
>>>>>> LOAD_NO_HINTING
>>>>>> ---> 24 from matplotlib.ttconv import convert_ttf_to_ps
>>>>>> 25 from matplotlib.mathtext import MathTextParser
>>>>>> 26 from matplotlib._mathtext_data import uni2type1
>>>>>>
>>>>>> ImportError: 
>>>>>> /home/amg/cdat4_1/lib/python2.4/site-packages/matplotlib/ttconv.so: 
>>>>>> undefined symbol: 
>>>>>> _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
>>>>>>
>>>>>> (The above backtrace is from iPython, but I get the same thing 
>>>>>> running from plain ol' Python.)
>>>>>>
>>>>>> Googling suggests that this might mean I have a version of 
>>>>>> Matplotlib that is too recent for the g++ compiler on my system, 
>>>>>> but I'm not really certain. I'm running as an unprivileged user 
>>>>>> on RHEL4, with most of the necessary libraries already present on 
>>>>>> the system. I've only had to add qt and PyQt, which are installed 
>>>>>> in my home directory, where Matplotlib can apparently find them. 
>>>>>> Version info is as follows:
>>>>>>
>>>>>> These are locally installed:
>>>>>> Python 2.4
>>>>>> qt-3.3.8b
>>>>>> PyQt-3.17.4
>>>>>> Matplotlib-0.91.2
>>>>>>
>>>>>> The following were already present:
>>>>>> Kernel: 2.6.9-67.0.1.ELsmp, on i686
>>>>>> glibc-2.3.4-2.39
>>>>>> gcc-3.4.6-9
>>>>>> tcl-8.4.7-2
>>>>>> tk-8.4.7-3.el4_6.1
>>>>>> freetype-2.1.9-6.el4
>>>>>> libpng-1.2.7-3.el4_5.1
>>>>>> zlib-1.2.1.2-1.2
>>>>>> ghostscript-7.07-33.2.el4_6.1
>>>>>> Output of 'gs --version': 8.50
>>>>>>
>>>>>> I tried switching to qt4/PyQt4, but then ipython -pylab hangs...
>>>>>>
>>>>>> Not sure what other info to supply; suggestions appreciated.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Arthur
>>>>>>
>>> ------------------------------------------------------------------------- 
>>>
>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>>> Don't miss this year's exciting event. There's still time to save 
>>> 100ドル. Use priority code J8TL2D2. 
>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone 
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save 
>> 100ドル. Use priority code J8TL2D2. 
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone 
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: John H. <jd...@gm...> - 2008年04月28日 21:24:46
On Mon, Apr 28, 2008 at 3:55 PM, Johann Cohen-Tanugi
<co...@sl...> wrote:
> Hi Michael,
>
> ok, here it is attached. For completion, from the matplotlib directory, I
> issued :
> [cohen@jarrett matplotlib]$ \rm -rf build
> [cohen@jarrett matplotlib]$ python setup.py build > build.log
> The following was printed out to the screen and not redirected :
> src/backend_agg.cpp: In member function 'Py::Object
> RendererAgg::write_rgba(const Py::Tuple&)':
> src/backend_agg.cpp:1303: warning: ignoring return value of 'size_t
> fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
> warn_unused_result
> src/backend_agg.cpp:1308: warning: ignoring return value of 'size_t
> fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
> warn_unused_result
> lib/enthought/traits/ctraits.c: In function '_trait_cast':
> lib/enthought/traits/ctraits.c:2370: warning: format '%lu' expects type
> 'long unsigned int', but argument 3 has type 'Py_ssize_t'
>
> I have revision 5087 of matplotlib. In the log you can see that libz is
> linked against for the backends, but not for ft2font......
> Best,
Do you have pkgconfig installed? In setupext.py, it looks like the
'z' lib is added only if we are not finding pkgconfig:
def add_ft2font_flags(module):
 'Add the module flags to ft2font extension'
 if not get_pkgconfig(module, 'freetype2'):
 module.libraries.extend(['freetype', 'z'])
If get_pkgconfig is returning True, but it is not configured properly
to find libz for freetype2, you may fall into a configure black hole
where libz never gets added.
Does it help to modify this function to read:
def add_ft2font_flags(module):
 'Add the module flags to ft2font extension'
 if not get_pkgconfig(module, 'freetype2'):
 module.libraries.extend(['freetype', 'z'])
 add_base_flags(module)
 basedirs = module.include_dirs[:] # copy the list to avoid inf loop!
 for d in basedirs:
 module.include_dirs.append(os.path.join(d, 'freetype2'))
 p = os.path.join(d, 'lib/freetype2/include')
 if os.path.exists(p): module.include_dirs.append(p)
 p = os.path.join(d, 'lib/freetype2/include/freetype2')
 if os.path.exists(p): module.include_dirs.append(p)
 basedirs = module.library_dirs[:] # copy the list to avoid inf loop!
 for d in basedirs:
 p = os.path.join(d, 'freetype2/lib')
 if os.path.exists(p): module.library_dirs.append(p)
 else:
 add_base_flags(module)
 module.libraries.append('z')
From: Johann Cohen-T. <co...@sl...> - 2008年04月28日 21:44:34
yes it does! -lz now shows up and the pstest runs fine. Any idea what is 
failing wrt pkgconfig?
thanks,
Johann
John Hunter wrote:
> On Mon, Apr 28, 2008 at 3:55 PM, Johann Cohen-Tanugi
> <co...@sl...> wrote:
> 
>> Hi Michael,
>>
>> ok, here it is attached. For completion, from the matplotlib directory, I
>> issued :
>> [cohen@jarrett matplotlib]$ \rm -rf build
>> [cohen@jarrett matplotlib]$ python setup.py build > build.log
>> The following was printed out to the screen and not redirected :
>> src/backend_agg.cpp: In member function 'Py::Object
>> RendererAgg::write_rgba(const Py::Tuple&)':
>> src/backend_agg.cpp:1303: warning: ignoring return value of 'size_t
>> fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
>> warn_unused_result
>> src/backend_agg.cpp:1308: warning: ignoring return value of 'size_t
>> fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
>> warn_unused_result
>> lib/enthought/traits/ctraits.c: In function '_trait_cast':
>> lib/enthought/traits/ctraits.c:2370: warning: format '%lu' expects type
>> 'long unsigned int', but argument 3 has type 'Py_ssize_t'
>>
>> I have revision 5087 of matplotlib. In the log you can see that libz is
>> linked against for the backends, but not for ft2font......
>> Best,
>> 
>
> Do you have pkgconfig installed? In setupext.py, it looks like the
> 'z' lib is added only if we are not finding pkgconfig:
>
> def add_ft2font_flags(module):
> 'Add the module flags to ft2font extension'
> if not get_pkgconfig(module, 'freetype2'):
> module.libraries.extend(['freetype', 'z'])
>
> If get_pkgconfig is returning True, but it is not configured properly
> to find libz for freetype2, you may fall into a configure black hole
> where libz never gets added.
>
> Does it help to modify this function to read:
>
> def add_ft2font_flags(module):
> 'Add the module flags to ft2font extension'
> if not get_pkgconfig(module, 'freetype2'):
> module.libraries.extend(['freetype', 'z'])
> add_base_flags(module)
>
> basedirs = module.include_dirs[:] # copy the list to avoid inf loop!
> for d in basedirs:
> module.include_dirs.append(os.path.join(d, 'freetype2'))
> p = os.path.join(d, 'lib/freetype2/include')
> if os.path.exists(p): module.include_dirs.append(p)
> p = os.path.join(d, 'lib/freetype2/include/freetype2')
> if os.path.exists(p): module.include_dirs.append(p)
>
> basedirs = module.library_dirs[:] # copy the list to avoid inf loop!
> for d in basedirs:
> p = os.path.join(d, 'freetype2/lib')
> if os.path.exists(p): module.library_dirs.append(p)
> else:
> add_base_flags(module)
> module.libraries.append('z')
> 
From: Johann Cohen-T. <co...@sl...> - 2008年04月29日 07:12:11
hi John,
for the record, I have a fedora 8 box, and the shipped version of 
pkgconfig (pkgconfig-0.22-4.fc8) gives me :
[cohen@jarrett matplotlib]$ /usr/bin/pkg-config --libs freetype2
-lfreetype 
No -lz here, if I am not wrong in my querying this tool .....
best,
Johann
From: John H. <jd...@gm...> - 2008年04月29日 12:26:32
On Tue, Apr 29, 2008 at 2:06 AM, Johann Cohen-Tanugi
<co...@sl...> wrote:
> hi John,
> for the record, I have a fedora 8 box, and the shipped version of
> pkgconfig (pkgconfig-0.22-4.fc8) gives me :
>
> [cohen@jarrett matplotlib]$ /usr/bin/pkg-config --libs freetype2
> -lfreetype
>
> No -lz here, if I am not wrong in my querying this tool .....
This looks like the correct incantation, so it appears that your
proplem is a misconfigured freetype2.pc. You might want to post
something to the fedora list, or to the free type list, or simply make
a patch against the pc file. I am not sure who maintains that part.
JDH
From: Johann Cohen-T. <co...@sl...> - 2008年04月30日 13:35:45
hello,
so the freetype.rc is defined with env variables that are supposed to be 
fed in when packaging it. LIBZ seemingly was missing when the fedora 8 
packaging of freetype was done. I added -lz directly to freetype.rc and 
rebuilt successfully matplotlib. I have no clue which mailing list to 
ping for a fedora packaging issue....
Anyway, end of story for this part of the thread....
best,
Johann
John Hunter wrote:
> On Tue, Apr 29, 2008 at 2:06 AM, Johann Cohen-Tanugi
> <co...@sl...> wrote:
> 
>> hi John,
>> for the record, I have a fedora 8 box, and the shipped version of
>> pkgconfig (pkgconfig-0.22-4.fc8) gives me :
>>
>> [cohen@jarrett matplotlib]$ /usr/bin/pkg-config --libs freetype2
>> -lfreetype
>>
>> No -lz here, if I am not wrong in my querying this tool .....
>> 
>
> This looks like the correct incantation, so it appears that your
> proplem is a misconfigured freetype2.pc. You might want to post
> something to the fedora list, or to the free type list, or simply make
> a patch against the pc file. I am not sure who maintains that part.
>
> JDH
> 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /