2

I have a Tkinter application that ran fine in OS X 10.7.5. Recently, when I upgraded to 10.9.2, it ceased to run, throwing this error:

Traceback (most recent call last):
 File "roiTracker.py", line 5127, in <module>
   startTracker(filename=filename)
 File "roiTracker.py", line 5111, in startTracker
   tk = TK.Tk()
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1745, in _init_
   self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

Tkinter and python versions:

user:Desktop user$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> Tkinter.__version__
'$Revision: 81008 $'
>>> exit()

Contents of $DISPLAY variable:

user:Desktop user$ echo $DISPLAY

user:Desktop user$

As per this similar-sounding problem, I tried

launchctl load -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

and got

Couldn't stat("/Library/LaunchAgents/org.macosforge.xquartz.startx.plist"): No such file or directory
nothing found to load

Not sure if that was naive or not - I'm pretty ignorant about how the windowing backends work.

I am running all of these commands locally.

Thank you for your help!

Community
  • 1
  • 1
Brionius
  • 13,858
  • 3
  • 38
  • 49
  • Might it be this problem? - http://stackoverflow.com/questions/20725694/tkinter-tclerror-no-display-name-and-no-display-environment-variable-for-new – OldGeeksGuide Apr 07 '14 at 23:49
  • Do you have XQuartz installed? - https://xquartz.macosforge.org/landing/ – OldGeeksGuide Apr 08 '14 at 00:27
  • Not that I know of - if you don't mind, can you explain why I need that for 10.9 but I didn't need it for 10.7? – Brionius Apr 08 '14 at 00:38
  • According to http://support.apple.com/kb/ht5293 "X11 is no longer included with OS X", it may have been included with 10.7, I don't remember exactly when they stopped including it. – OldGeeksGuide Apr 08 '14 at 02:37

0 Answers0