build problems

We started using Python 2.7.2 a week or two ago, and I’m now running into this problem when attempting to build matplotlib 1.0.1 on several of our machines:

basedirlist is:

···

============================================================================

BUILDING MATPLOTLIB

matplotlib: 1.0.1

python: 2.7.2 (default_cci, Jun 28 2011, 12:34:28) [GCC

4.0.1 (Apple Computer, Inc. build 5367)]

platform: darwin

REQUIRED DEPENDENCIES

numpy: 1.5.1

freetype2: found, but unknown version (no pkg-config)

  • WARNING: Could not find ‘freetype2’ headers in any

  • of ‘.’, ‘./freetype2’.

OPTIONAL BACKEND DEPENDENCIES

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

  • Could not find ‘libpng’ headers in any of ‘.’

Traceback (most recent call last):

File “setup.py”, line 162, in

if check_for_tk() or (options[‘build_tkagg’] is True):

File "/Volumes/Scratch1/nat/phenix_installer/build-source/mac-intel-osx/patchnose/tmp/matplotl

ib-1.0.1/setupext.py", line 832, in check_for_tk

(Tkinter.version.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))

IndexError: list index out of range

When I run the version of Python that I’m using to build matplotlib, this is what I’m seeing:

import Tkinter

Tkinter.version

Revision

I don’t need or want Tkinter support either in Python or in matplotlib, but it appears to be impossible to disable Tkinter when compiling Python. Is there a way around this problem without patching the Python build, or matplotlib, or both?

thanks,

Nat

Nat Echols, on 2011-06-28 12:58, wrote:

We started using Python 2.7.2 a week or two ago, and I'm now running into
this problem when attempting to build matplotlib 1.0.1 on several of our
machines:

Traceback (most recent call last):
  File "setup.py", line 162, in <module>
    if check_for_tk() or (options['build_tkagg'] is True):
  File
"/Volumes/Scratch1/nat/phenix_installer/build-source/mac-intel-osx/patchnose/tmp/matplotl
ib-1.0.1/setupext.py", line 832, in check_for_tk
    (Tkinter.__version__.split()[-2], Tkinter.TkVersion,
Tkinter.TclVersion))
IndexError: list index out of range

When I run the version of Python that I'm using to build matplotlib, this is
what I'm seeing:

>>> import Tkinter
>>> Tkinter.__version__
'Revision'

Hi Nat,

It's strange that your Tkinter got built without a typical
version string. For me:

In [1]: import Tkinter

In [2]: Tkinter.__version__
Out[2]: 'Revision: 73770 '

In [3]: Tkinter.__version__.split()[-2]
Out[3]: '73770'

I don't need or want Tkinter support either in Python or in matplotlib, but
it appears to be impossible to disable Tkinter when compiling Python. Is
there a way around this problem without patching the Python build, or
matplotlib, or both?

I'm not sure about Python, but for matplotlib, just add these two
lines to your setup.cfg (or create one with these two lines in
it):

[gui_support]
tkagg = False

You can read the setup.cfg.template for a full explanation (and
other install options available to you).A

best,

···

--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7