On Mon, Oct 20, 2008 at 6:33 AM, Pete <[EMAIL PROTECTED]> wrote: > Has anyone had any luck compiling Matplotlib using cygwin? > Out of the box I get the following: (I have numpy, tcl/tk and libpng1.2 > installed) > > ~/matpl/matplotlib-0.98.3$ python setup.py build > ============================================================================ > BUILDING MATPLOTLIB > matplotlib: 0.98.3 > python: 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC > 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] > platform: cygwin > > REQUIRED DEPENDENCIES > numpy: 1.2.0 > freetype2: 9.18.3 > > OPTIONAL BACKEND DEPENDENCIES > libpng: found, but unknown version (no pkg-config) > * Could not find 'libpng' headers in any of > * '/usr/include', '.' > Traceback (most recent call last): > File "setup.py", line 125, in <module> > if check_for_tk() or (options['build_tkagg'] is True): > File "/cygdrive/c/linuxshare/matpl/matplotlib-0.98.3/setupext.py", line > 841, in check_for_tk > explanation = add_tk_flags(module) > File "/cygdrive/c/linuxshare/matpl/matplotlib-0.98.3/setupext.py", line > 1084, in add_tk_flags > result = parse_tcl_config(tcl_lib_dir, tk_lib_dir) > File "/cygdrive/c/linuxshare/matpl/matplotlib-0.98.3/setupext.py", line > 946, in parse_tcl_config > tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:] > IndexError: list index out of range
This is probably something you will have to debug yourself, since it is dependent on the TK you have installed on your system, but it is fairly easy to do. Edit setupext.py, store the results of tmp = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split() print tmp and see what is returned. The setup code is trying to index into this data structure, and what is coming back is not what is expected. It would be helpful to see what is coming back. Note this call happens in a large try except block, so you could add your exception (IndexError) to the list of exceptions that are caught, which will return None from this function. This will keep your build from crashing. Alternatively, if you know you want some backend like gtkagg or wxagg and don't need tkagg, you can turn this off by copying setup.cfg.template to setup.cfg and manually customizing the backends which are built. But the ideal will be to fix the tk config bug and send us a patch . JDH > > > Any help or ideas appreciated! > Thanks, > Pete > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users