Compiling setup.py for Matplotlib

Hello everyone. I’m having some trouble compiling setup.py for Matplotlib. I’m trying to run it on Cygwin.

$ uname -a
CYGWIN_NT-5.1 name 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I have Python 2.5.2 installed, as well as libpng, freetype2, and zlib, although for some reason the compiler cannot determine the version. I got Matplotlib from sourceforge. Here is the output when I run the code:

$ python setup.py build

···

============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.98.5.2
python: 2.5.2 (r252:60911, Dec 2 2008, 09:26:14) [GCC
3.4.4 (cygming special, gdc 0.12, using dmd 0.125)]
platform: cygwin

REQUIRED DEPENDENCIES
numpy: 1.2.1
freetype2: found, but unknown version (no pkg-config)

OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)

Test
Traceback (most receent call last):
File “setup.py”, line 134, in
if check_for_tk() or (options[‘build_tkagg’] is True):
File “/home/firstname lastname/matplotlib-0.98.5.2/setupext.py”, line 782, in check
for_tk
explanation = add_tk_flags(module)
File “/home/firstname lastname/matplotlib-0.98.5.2/setupext.py”, line 1043, in add

tk_flags
result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
File “/home/firstname lastname/matplotlib-0.98.5.2/setupext.py”, line 900, in parse
_tcl_config
tk_lib = tk_vars.get(“default”, “TK_LIB_SPEC”)[1:-1].split()[0][2:]
IndexError: list index out of range

It seems as though the error is in line 900 of setupext.py, but I don’t have quite enough programming knowledge to be certain. Any help anyone could give me would be greatly appreciated.

Thanks!


Hotmail® is up to 70% faster. Now good news travels really fast. Find out more.