Jeff,
I had already had tk-dev installed:
$ sudo apt-get install tk-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
tk-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
Please see my latest… This is amazingly difficult. Didn’t remember it being this hard when I did it on my Suse machine.
Kurt
···
==================
Date: Tue, 13 Oct 2009 13:46:22 -0600
From: Jeff Whitaker <jswhit@…2822…6…>
Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl
0.99.1.1, python 2.6
To: KURT PETERS <peterskurt@…1954…>
Cc: matplotlib-users@lists.sourceforge.net
Message-ID: <4AD4D90E.5080305@…146…>
<snip…>
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
[/code]
Kurt: It’s not finding tk.h, so you probably need to install the tk-dev package.
-Jeff
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@…259…
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory
<snip…>
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
604 sudo apt-get install tk-dev
KURT PETERS wrote:
Jeff,
I had already had tk-dev installed:
$ sudo apt-get install tk-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
tk-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
Please see my latest... This is amazingly difficult. Didn't remember it being this hard when I did it on my Suse machine.
Kurt
So where's your tk.h file?
-Jeff
···
==================
> Date: Tue, 13 Oct 2009 13:46:22 -0600
> From: Jeff Whitaker <jswhit@...146...>
> Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl
> 0.99.1.1, python 2.6
> To: KURT PETERS <peterskurt@...1954...>
> Cc: matplotlib-users@lists.sourceforge.net
> Message-ID: <4AD4D90E.5080305@...146...>
<snip...>
> > 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
> > [/code]
>
> Kurt: It's not finding tk.h, so you probably need to install the tk-dev package.
>
> -Jeff
>
> ----
> Jeffrey S. Whitaker Phone : (303)497-6313
> Meteorologist FAX : (303)497-6449
> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
> 325 Broadway Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory
>
<snip...>
>
> 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
> 604 sudo apt-get install tk-dev
------------------------------------------------------------------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory
Apparently, I have two
$ sudo find / -name “tk.h”
/usr/include/tcl8.4/tk.h
/usr/include/tcl8.4/tk-private/generic/tk.h
Kurt
···
Date: Tue, 13 Oct 2009 15:55:51 -0600
From: jswhit@…146…
Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6
To: peterskurt@…1954…
CC: matplotlib-users@lists.sourceforge.net
KURT PETERS wrote:
Jeff,
I had already had tk-dev installed:
$ sudo apt-get install tk-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
tk-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
Please see my latest… This is amazingly difficult. Didn’t remember
it being this hard when I did it on my Suse machine.
Kurt
So where’s your tk.h file?
-Jeff
KURT PETERS wrote:
Apparently, I have two
$ sudo find / -name "tk.h"
/usr/include/tcl8.4/tk.h
/usr/include/tcl8.4/tk-private/generic/tk.h
But you need /usr/include/tcl8.5/tk.h. Matplotlib is detecting a tk 8.5 installation, so it's looking for a tk 8.5 header.
-Jeff
···
Kurt
> Date: Tue, 13 Oct 2009 15:55:51 -0600
> From: jswhit@...146...
> Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6
> To: peterskurt@...1954...
> CC: matplotlib-users@lists.sourceforge.net
>
> KURT PETERS wrote:
> > Jeff,
> > I had already had tk-dev installed:
> > $ sudo apt-get install tk-dev
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > tk-dev is already the newest version.
> > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
> >
> > Please see my latest... This is amazingly difficult. Didn't remember
> > it being this hard when I did it on my Suse machine.
> >
> > Kurt
>
> So where's your tk.h file?
>
> -Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory
OK, that got me a hair further With your suggestion I got past that speed bump by:
sudo apt-get install tk8.5-dev tcl8.5-dev
Now the error is a little more sinister. I did a tiny bit of research and some posts says the error could be due to no installation of g++. but…
sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[code]
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/IndirectPythonInterface.o build/temp.linux-i686-2.6/CXX/cxxsupport.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
building 'matplotlib.backends._macosx' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/usr/lib/python2.6/dist-packages/numpy/core/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/include/python2.6 -c src/_macosx.m -o build/temp.linux-i686-2.6/src/_macosx.o
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
[/code]
Is it possible I need a special version of g++?
Kurt
KURT PETERS wrote:
OK, that got me a hair further With your suggestion I got past that speed bump by:
sudo apt-get install tk8.5-dev tcl8.5-dev
Now the error is a little more sinister. I did a tiny bit of research and some posts says the error could be due to no installation of g++. but...
[code]
sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[/code]
<NEW ERROR MESSAGE>
[code]
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/IndirectPythonInterface.o build/temp.linux-i686-2.6/CXX/cxxsupport.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 building 'matplotlib.backends._macosx' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/usr/lib/python2.6/dist-packages/numpy/core/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/include/python2.6 -c src/_macosx.m -o build/temp.linux-i686-2.6/src/_macosx.o
gcc: error trying to exec 'cc1obj': execvp: No such file or directory error: command 'gcc' failed with exit status 1
[/code]
Kurt:
I don't think you should be building the macosx backend on linux. Try copying setup.cfg.template to setup.cfg, then edit that file and uncomment the line
#macosx = False
Then run setup.py build again.
-Jeff
···
Is it possible I need a special version of g++?
Kurt
------------------------------------------------------------------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory
From: jswhit@…146…
Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6
To: peterskurt@…2823…4…
KURT PETERS wrote:
OK, that got me a hair further With your suggestion I got past
that speed bump by:
sudo apt-get install tk8.5-dev tcl8.5-dev
> > error: command 'gcc' failed with exit status 1
> > [/code]
> >
> Kurt:
>
> I don't think you should be building the macosx backend on linux. Try
> copying setup.cfg.template to setup.cfg, then edit that file and
> uncomment the line
>
> #macosx = False
>
> Then run setup.py build again.
>
>
> -Jeff
You’re right, I had just tried something similar before I received your post:
I modified the setup.cfg with:
#gtk = False
#gtkagg = False
tkagg = True
wxagg = True
macosx = auto
qtagg = True
→ I’m not sure if the qtagg means anything, but since I’m using qt, I thought I’d throw it in there and see what happens.
Thanks for the help!
If someone wants to modify the install page with the following suggested deps.:
TO ANYONE TRYING TO GET ALL DEPS FOR Kubuntu JAUNTY (9.04) with python 2.6…
This is the final set that got me there:
sudo apt-get install libblas-dev gfortran liblapack-dev python-symeig
libfreetype6 libfreetype6-dev tk dvipng python-qt4 python-qt4-common
python-tk python-wxgtk2.8 python-wxaddons python-wxtools wx-common
wx2.8-headers libwxbase2.8-0 libwxbase2.8-dev libwxgtk2.8-0
libwxgtk2.8-dev tcl8.5-dev tk-dev gfortran-multilib
sudo apt-get install python-qt4-dev libqt4-core python-qt4-common python-qt4
sudo apt-get install tk8.5-dev tcl8.5-dev
for Intel:
sudo apt-get install libatlas-sse2-dev libatlas3gf-sse2
or for AMD:
sudo apt-get install libatlas-3dnow-dev libatlas3gf-3dnow