cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

OK, I got by the tk part by installing tk-dev, but now get:

sudo python setup.py build                                                       

<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

============================================================================                                      
BUILDING MATPLOTLIB                                                                                               
            matplotlib: 0.99.1.1                                                                                  
                python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC                                      
                        4.3.3]                                                                                    
              platform: linux2                                                                                    

REQUIRED DEPENDENCIES
                 numpy: 1.2.1
             freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.27
               Tkinter: Tkinter: 70220, Tk: 8.5, Tcl: 8.5
              wxPython: 2.8.9.1                         
                        * WxAgg extension not required for wxPython >= 2.8
            pkg-config: looking for pygtk-2.0 gtk+-2.0                   
                        * Package pygtk-2.0 was not found in the pkg-config
                        * search path. Perhaps you should add the directory
                        * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH
                        * environment variable No package 'pygtk-2.0' found
                        * Package gtk+-2.0 was not found in the pkg-config
                        * search path. Perhaps you should add the directory
                        * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH 
                        * environment variable No package 'gtk+-2.0' found
                        * You may need to install 'dev' package(s) to     
                        * provide header files.                           
                  Gtk+: no                                                
                        * Could not find Gtk+ headers in any of           
                        * '/usr/local/include', '/usr/include', '.'       
       Mac OS X native: no                                                
                    Qt: no                                                
                   Qt4: no                                                
                 Cairo: 1.4.12                                            

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: matplotlib will provide
adding pytz

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: 8.64
                 latex: 3.141592
               pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/usr/include/tcl8.4 -I/usr/include/tcl8.4 -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.6 -c src/_tkagg.cpp -o build/temp.linux-i686-2.6/src/_tkagg.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from /usr/include/c++/4.3/ext/hash_map:64,
                 from ./CXX/Extensions.hxx:68,
                 from src/_backend_agg.h:8,
                 from src/_tkagg.cpp:18:
/usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6/src/agg_py_transforms.o build/temp.linux-i686-2.6/src/_tkagg.o build/temp.linux-i686-2.6/CXX/cxx_extensions.o build/temp.linux-i686-2.6/CXX/cxxsupport.o build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
/usr/bin/ld: cannot find -ltk8.5
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

Message: 2
Date: Tue, 13 Oct 2009 13:35:43 -0600
From: KURT PETERS <peterskurt@…1954…>
Subject: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6
To: matplotlib-users@lists.sourceforge.net
Message-ID: <SNT107-W56E2AF630237BA89803B58D8C70@…520…>
Content-Type: text/plain; charset=“windows-1252”

I’m pretty sure I have all the required minimal dependencies installed, but get an error when I sudo python setup.py build. Any thoughts? I can start python and import Tkinter without an error. So I don’t know why it’s not finding it.

sudo python setup.py build
> ============================================================================
> BUILDING MATPLOTLIB
> matplotlib: 0.99.1.1
> python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC
> 4.3.3]
> platform: linux2
>
> REQUIRED DEPENDENCIES
> numpy: 1.2.1
> freetype2: 9.20.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.27
> Tkinter: no
> * Using default library and include directories for
> * Tcl and Tk because a Tk window failed to open.
> * You may need to define DISPLAY for Tk to work so
> * that setup can determine where your libraries are
> * located. Tkinter present, but header files are not
> * found. You may need to install development
> * packages.
> wxPython: 2.8.9.1
> * WxAgg extension not required for wxPython >= 2.8
> pkg-config: looking for pygtk-2.0 gtk+-2.0
> * Package pygtk-2.0 was not found in the pkg-config
> * search path. Perhaps you should add the directory
> * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH
> * environment variable No package 'pygtk-2.0' found
> * Package gtk+-2.0 was not found in the pkg-config
> * search path. Perhaps you should add the directory
> * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH
> * environment variable No package 'gtk+-2.0' found
> * You may need to install 'dev' package(s) to
> * provide header files.
> Gtk+: no
> * Could not find Gtk+ headers in any of
> * '/usr/local/include', '/usr/include', '.'
> Mac OS X native: no
> Qt: no
> Qt4: no
> Cairo: 1.4.12
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
> datetime: present, version unknown
> dateutil: matplotlib will provide
> pytz: matplotlib will provide
> adding pytz
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: no
> ghostscript: 8.64
> latex: 3.141592
> pdftops: 0.10.5
>
> [Edit setup.cfg to suppress the above messages]
> ============================================================================
> pymods ['pylab']
> packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
> running build
> running build_py
> copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.6/matplotlib/mpl-data
> copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.6/matplotlib/mpl-data
> running build_ext
> building 'matplotlib.backends._tkagg' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.6 -c src/_tkagg.cpp -o build/temp.linux-i686-2.6/src/_tkagg.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
> In file included from /usr/include/c++/4.3/ext/hash_map:64,
> from ./CXX/Extensions.hxx:68,
> from src/_backend_agg.h:8,
> from src/_tkagg.cpp:18:
> /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
> src/_tkagg.cpp:30:18: error: tk.h: No such file or directory
> src/_tkagg.cpp:38: error: ISO C++ forbids declaration of ?Tcl_Interp? with no type
> src/_tkagg.cpp:38: error: expected ?;? before ?*? token
> src/_tkagg.cpp:42: error: ?ClientData? was not declared in this scope
> src/_tkagg.cpp:42: error: ?Tcl_Interp? was not declared in this scope
> src/_tkagg.cpp:42: error: ?interp? was not declared in this scope
> src/_tkagg.cpp:43: error: expected primary-expression before ?int?
> src/_tkagg.cpp:43: error: expected primary-expression before ?char?
> src/_tkagg.cpp:43: error: initializer expression list treated as compound expression
> src/_tkagg.cpp:44: error: expected ?,? or ?;? before ?{? token
> /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: ?int _import_array()? defined but not used
> src/_tkagg.cpp:42: warning: ?PyAggImagePhoto? defined but not used
> error: command 'gcc' failed with exit status 1

KURT PETERS wrote:

OK, I got by the tk part by installing tk-dev, but now get:

[...]

build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
/usr/bin/ld: cannot find -ltk8.5
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
[/code]

What does

ls /usr/lib/libtk8.5*

show?

Eric

Getting closer… I’m going to post the sum total of “apt-get installs” I had to do to get matplotlib installed when I get it working (prelim. is at the end of this message).

I’m thinking on this one, something with ltk in it, but none of these look promising:

apt-cache search tk | grep "ltk"
fltk1.1-games - Fast Light Toolkit - example games: checkers, sudoku
freepops-updater-fltk - Graphical interface for the freepops updater engine
hfsutils-tcltk - Tcl/Tk interfaces for reading and writing Macintosh volumes
libtcltk-ruby - Tcl/Tk interface for Ruby
sufary-tcltk - Tcl/Tk interface for SUFARY
mgltools-opengltk - opengltk python extension
fltk1.1-doc - Fast Light Toolkit - documentation
libfltk1.1 - Fast Light Toolkit - shared libraries
libfltk1.1-dbg - Fast Light Toolkit - shared libraries with debugging symbols
libfltk1.1-dev - Fast Light Toolkit - development files
libtcltk-ruby1.8 - Tcl/Tk interface for Ruby 1.8
libtcltk-ruby1.9 - Tcl/Tk interface for Ruby 1.9

Here’s what’s in my /usr/lib (for libtk8.5*) directory:

$ ls /usr/lib/libtk8.5*
/usr/lib/libtk8.5.so.0

Here’s the latest error message:


<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

============================================================================
BUILDING MATPLOTLIB                                                        
            matplotlib: 0.99.1.1                                           
                python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC
                        4.3.3]                                             
              platform: linux2                                             

REQUIRED DEPENDENCIES
                 numpy: 1.2.1
             freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.27
               Tkinter: Tkinter: 70220, Tk: 8.5, Tcl: 8.5
              wxPython: 2.8.9.1                         
                        * WxAgg extension not required for wxPython >= 2.8
            pkg-config: looking for pygtk-2.0 gtk+-2.0                   
                        * Package pygtk-2.0 was not found in the pkg-config
                        * search path. Perhaps you should add the directory
                        * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH
                        * environment variable No package 'pygtk-2.0' found
                        * Package gtk+-2.0 was not found in the pkg-config
                        * search path. Perhaps you should add the directory
                        * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH
                        * environment variable No package 'gtk+-2.0' found
                        * You may need to install 'dev' package(s) to
                        * provide header files.
                  Gtk+: no
                        * Could not find Gtk+ headers in any of
                        * '/usr/local/include', '/usr/include', '.'
       Mac OS X native: no
                    Qt: no
                   Qt4: no
                 Cairo: 1.4.12

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: matplotlib will provide
adding pytz

OPTIONAL USETEX DEPENDENCIES
                dvipng: 1.11
           ghostscript: 8.64
                 latex: 3.141592
               pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6/src/agg_py_transforms.o build/temp.linux-i686-2.6/src/_tkagg.o build/temp.linux-i686-2.6/CXX/cxx_extensions.o build/temp.linux-i686-2.6/CXX/cxxsupport.o build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
/usr/bin/ld: cannot find -ltk8.5
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

Here’s what I “had” to install so far for Kubuntu Jaunty 9.04 (first few were required by numpy):

495 sudo apt-get install matplotlib <-- always worth a try… didn’t work

520 sudo apt-get install libatlas3gf-3dnow

523 sudo apt-get install libblas-dev

532 sudo apt-get install gfortran

534 sudo apt-get install lapack

536 sudo apt-get install liblapack-dev

537 sudo apt-get install python-symeig libatlas-3dnow-dev

549 sudo apt-get install freetype

552 sudo apt-get install libfreetype6

554 sudo apt-get install libfreetype6-dev

555 sudo apt-get install tk

556 sudo apt-get install dvipng

569 sudo apt-get install python-qt4 python-qt4-common

574 sudo apt-get install python-tk wxPython

576 sudo apt-get install python-tk python-wxaddons

577 sudo apt-get install python-tk python-wxtools

590 sudo apt-get install wx-common

591 sudo apt-get install wx-headers

592 sudo apt-get install wx2.8-headers

593 sudo apt-get install libwxbase2.8-0

594 sudo apt-get install libwxgtk2.8-0

603 sudo apt-get install tcl8.5-dev

Someone may want to update the install page once I get a completed list.
Kurt