v.0.99.1.1 DeprecationWarning: Use the new widget gtk.Tooltip() self.tooltips = gtk.Tooltips()

I am new to python and when using Matplotlib 0.99.1.1 [Scientific Linux
6.3, Python 2.6] to plot I get the following error:

/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip
  self.tooltips = gtk.Tooltips()

This is when the program reaches:

  plt.show()

Where plt is the matplotlib.pyplot. Prior to this point of the code I am
able to produce pdf files of the figure by using plt.savefig(fname).

Reading other online comments I have tried to update Matplotlib. First I
installed the dependences via

  sudo yum-builddep python-matplotlib

Then:

  sudo yum install matplotlib

This then tells me that I have the latest version of matplotlib and
therefore does nothing. There are more recent versions available from
the Matplotlib website. I tried to install the latest version after
unpacking the tar.gz file. After using the command:

  sudo python setup.py install

I get the message below ending with error:

  command 'gcc' failed with exit status 1

Can anyone suggest a way to install the latest matplotlib or stop the
message I get with using plt.show()?

Jonathan

basedirlist is: ['/usr/local', '/usr', 'usr/lib64']

···

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.2.1
                python: 2.6.6 (r266:84292, Jun 18 2012, 09:57:52) [GCC
                        4.4.6 20110731 (Red Hat 4.4.6-3)]
              platform: linux2

REQUIRED DEPENDENCIES
                 numpy: 1.4.1
             freetype2: 9.22.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.49
               Tkinter: Tkinter: 73770, Tk: 8.5, Tcl: 8.5
                        * Guessing the library and include directories
for
                        * Tcl and Tk because the tclConfig.sh and
                        * tkConfig.sh could not be found and/or parsed.
                  Gtk+: gtk+: 2.18.9, glib: 2.22.5, pygtk: 2.16.0,
                        pygobject: 2.20.0
       Mac OS X native: no
                    Qt: no
                   Qt4: Qt: 4.6.2, PyQt4: 4.7.4
                PySide: no
                 Cairo: 1.8.6

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              dateutil: 1.4.1
                  pytz: 2010h

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: 8.70
                 latex: 3.141592
               pdftops: 0.12.4

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.backends.qt4_editor', 'matplotlib.projections',
'matplotlib.testing', 'matplotlib.testing.jpl_units',
'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1',
'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri',
'matplotlib.delaunay']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-x86_64-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._backend_agg' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_trans_affine.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_trans_affine.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_bezier_arc.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_bezier_arc.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_curves.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_curves.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_vcgen_dash.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_vcgen_dash.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_vcgen_stroke.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_vcgen_stroke.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_image_filters.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_image_filters.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/mplutils.cpp -o
build/temp.linux-x86_64-2.6/src/mplutils.o
In file included from /usr/include/python2.6/pyconfig.h:6,
                 from /usr/include/python2.6/Python.h:8,
                 from src/mplutils.h:18,
                 from src/mplutils.cpp:6:
/usr/include/python2.6/pyconfig-64.h:1034:1: warning: "_POSIX_C_SOURCE"
redefined
In file included
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/os_defines.h:39,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/c++config.h:1687,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/iostream:39,
                 from src/mplutils.cpp:3:
/usr/include/features.h:162:1: warning: this is the location of the
previous definition
In file included from /usr/include/python2.6/pyconfig.h:6,
                 from /usr/include/python2.6/Python.h:8,
                 from src/mplutils.h:18,
                 from src/mplutils.cpp:6:
/usr/include/python2.6/pyconfig-64.h:1043:1: warning: "_XOPEN_SOURCE"
redefined
In file included
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/os_defines.h:39,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/c++config.h:1687,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/iostream:39,
                 from src/mplutils.cpp:3:
/usr/include/features.h:164:1: warning: this is the location of the
previous definition
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/agg_py_transforms.cpp -o
build/temp.linux-x86_64-2.6/src/agg_py_transforms.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxxsupport.cxx -o
build/temp.linux-x86_64-2.6/CXX/cxxsupport.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/IndirectPythonInterface.cxx -o
build/temp.linux-x86_64-2.6/CXX/IndirectPythonInterface.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxx_extensions.cxx -o
build/temp.linux-x86_64-2.6/CXX/cxx_extensions.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxxextensions.c -o
build/temp.linux-x86_64-2.6/CXX/cxxextensions.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/backend_agg.cpp -o
build/temp.linux-x86_64-2.6/src/backend_agg.o
In file included from src/backend_agg.cpp:42:
src/file_compat.h:4:32: error: numpy/npy_3kcompat.h: No such file or
directory
In file included from src/backend_agg.cpp:42:
src/file_compat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’:
src/file_compat.h:125: warning: deprecated conversion from string
constant to ‘char*’
src/backend_agg.cpp: In member function ‘Py::Object
RendererAgg::write_rgba(const Py::Tuple&)’:
src/backend_agg.cpp:2040: error: ‘npy_PyFile_OpenFile’ was not declared
in this scope
src/backend_agg.cpp:2050: error: ‘npy_PyFile_Dup’ was not declared in
this scope
src/backend_agg.cpp:2054: error: ‘npy_PyFile_DupClose’ was not declared
in this scope
src/backend_agg.cpp:2064: error: ‘npy_PyFile_DupClose’ was not declared
in this scope
error: command 'gcc' failed with exit status 1

It looks like the version of Numpy installed on your machine is too old for the latest version of matplotlib. You'll need at least version 1.5, I believe (though we neglected to update the documentation about this requirement).

Mike

···

On 07/03/2013 05:13 PM, David Jonathan Pryce Morris wrote:

I am new to python and when using Matplotlib 0.99.1.1 [Scientific Linux
6.3, Python 2.6] to plot I get the following error:

/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip
   self.tooltips = gtk.Tooltips()

This is when the program reaches:

  plt.show()

Where plt is the matplotlib.pyplot. Prior to this point of the code I am
able to produce pdf files of the figure by using plt.savefig(fname).

Reading other online comments I have tried to update Matplotlib. First I
installed the dependences via

  sudo yum-builddep python-matplotlib

Then:

  sudo yum install matplotlib

This then tells me that I have the latest version of matplotlib and
therefore does nothing. There are more recent versions available from
the Matplotlib website. I tried to install the latest version after
unpacking the tar.gz file. After using the command:

  sudo python setup.py install

I get the message below ending with error:

  command 'gcc' failed with exit status 1

Can anyone suggest a way to install the latest matplotlib or stop the
message I get with using plt.show()?

Jonathan

basedirlist is: ['/usr/local', '/usr', 'usr/lib64']

BUILDING MATPLOTLIB
             matplotlib: 1.2.1
                 python: 2.6.6 (r266:84292, Jun 18 2012, 09:57:52) [GCC
                         4.4.6 20110731 (Red Hat 4.4.6-3)]
               platform: linux2

REQUIRED DEPENDENCIES
                  numpy: 1.4.1
              freetype2: 9.22.3

OPTIONAL BACKEND DEPENDENCIES
                 libpng: 1.2.49
                Tkinter: Tkinter: 73770, Tk: 8.5, Tcl: 8.5
                         * Guessing the library and include directories
for
                         * Tcl and Tk because the tclConfig.sh and
                         * tkConfig.sh could not be found and/or parsed.
                   Gtk+: gtk+: 2.18.9, glib: 2.22.5, pygtk: 2.16.0,
                         pygobject: 2.20.0
        Mac OS X native: no
                     Qt: no
                    Qt4: Qt: 4.6.2, PyQt4: 4.7.4
                 PySide: no
                  Cairo: 1.8.6

OPTIONAL DATE/TIMEZONE DEPENDENCIES
               dateutil: 1.4.1
                   pytz: 2010h

OPTIONAL USETEX DEPENDENCIES
                 dvipng: no
            ghostscript: 8.70
                  latex: 3.141592
                pdftops: 0.12.4

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.backends.qt4_editor', 'matplotlib.projections',
'matplotlib.testing', 'matplotlib.testing.jpl_units',
'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1',
'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri',
'matplotlib.delaunay']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-x86_64-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._backend_agg' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_trans_affine.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_trans_affine.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_bezier_arc.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_bezier_arc.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_curves.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_curves.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_vcgen_dash.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_vcgen_dash.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_vcgen_stroke.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_vcgen_stroke.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c agg24/src/agg_image_filters.cpp -o
build/temp.linux-x86_64-2.6/agg24/src/agg_image_filters.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/mplutils.cpp -o
build/temp.linux-x86_64-2.6/src/mplutils.o
In file included from /usr/include/python2.6/pyconfig.h:6,
                  from /usr/include/python2.6/Python.h:8,
                  from src/mplutils.h:18,
                  from src/mplutils.cpp:6:
/usr/include/python2.6/pyconfig-64.h:1034:1: warning: "_POSIX_C_SOURCE"
redefined
In file included
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/os_defines.h:39,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/c++config.h:1687,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/iostream:39,
                  from src/mplutils.cpp:3:
/usr/include/features.h:162:1: warning: this is the location of the
previous definition
In file included from /usr/include/python2.6/pyconfig.h:6,
                  from /usr/include/python2.6/Python.h:8,
                  from src/mplutils.h:18,
                  from src/mplutils.cpp:6:
/usr/include/python2.6/pyconfig-64.h:1043:1: warning: "_XOPEN_SOURCE"
redefined
In file included
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/os_defines.h:39,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/x86_64-redhat-linux/bits/c++config.h:1687,

from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c
++/4.4.6/iostream:39,
                  from src/mplutils.cpp:3:
/usr/include/features.h:164:1: warning: this is the location of the
previous definition
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/agg_py_transforms.cpp -o
build/temp.linux-x86_64-2.6/src/agg_py_transforms.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxxsupport.cxx -o
build/temp.linux-x86_64-2.6/CXX/cxxsupport.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/IndirectPythonInterface.cxx -o
build/temp.linux-x86_64-2.6/CXX/IndirectPythonInterface.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxx_extensions.cxx -o
build/temp.linux-x86_64-2.6/CXX/cxx_extensions.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c CXX/cxxextensions.c -o
build/temp.linux-x86_64-2.6/CXX/cxxextensions.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
-Iusr/lib64/include -Iusr/lib64/python2.6/include
-Iusr/lib64/python2.6/site-packages/include
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python2.6/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.6 -c src/backend_agg.cpp -o
build/temp.linux-x86_64-2.6/src/backend_agg.o
In file included from src/backend_agg.cpp:42:
src/file_compat.h:4:32: error: numpy/npy_3kcompat.h: No such file or
directory
In file included from src/backend_agg.cpp:42:
src/file_compat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’:
src/file_compat.h:125: warning: deprecated conversion from string
constant to ‘char*’
src/backend_agg.cpp: In member function ‘Py::Object
RendererAgg::write_rgba(const Py::Tuple&)’:
src/backend_agg.cpp:2040: error: ‘npy_PyFile_OpenFile’ was not declared
in this scope
src/backend_agg.cpp:2050: error: ‘npy_PyFile_Dup’ was not declared in
this scope
src/backend_agg.cpp:2054: error: ‘npy_PyFile_DupClose’ was not declared
in this scope
src/backend_agg.cpp:2064: error: ‘npy_PyFile_DupClose’ was not declared
in this scope
error: command 'gcc' failed with exit status 1

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users