Hey all,

I hope this is the right list for this sort of thing, but here goes.
My installation of matplotlib (via macports) bombed out with this
error:

Traceback (most recent call last):
  File "setup.py", line 125, in <module>
    if check_for_tk() or (options['build_tkagg'] is True):
  File 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.3/setupext.py",
line 841, in check_for_tk
    explanation = add_tk_flags(module)
  File 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.3/setupext.py",
line 1055, in add_tk_flags
    module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver])
UnboundLocalError: local variable 'tk_ver' referenced before assignment

I fixed it by adding
        tcl_lib_dir = ""
        tk_lib_dir = ""
        tk_ver = ""
at line 1033 in setupext.py.  That way, if we do get an exception in
the ensuing try block, the variables are still defined.  This seemed
to clear things up nicely.  Hope that's clear... feel free to ask for
any further debugging info.  Thanks!

Keaton Mowery

-------------------------------------------------------------------------
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to