Mac OS X: _tkinter.TclError: no display name and no $ DISPLAY environment variable

As I said, I installed Python 3.3 from Macports.

Now when I do an Idle searchlight search

Idle -- Python 3.3 

. However, when I try to click it, nothing happens. No error is displayed or anything - it does not start.

What do you think maybe wrong?

It reminds this question: Python 3.0 - Idle wont open. He just bounces in the dock

The difference is that I do not receive error messages and use 3.3


Update:

Now I tried to install Py3.3 as the main version using macports select. Then I tried to open IDLE from the console and received the following error message:

  Traceback (most recent call last): File "/opt/local/bin/idle", line 5, in <module> main() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/PyShell.py", line 1421, in main root = Tk(className="Idle") File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/tkinter/__init__.py", line 1756, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable 
+3
python macports macos
source share
2 answers

Using macports, install py33-tkinter

sudo port install py33-tkinter

Edit: Make sure you have X11 or Xquartz installed.

+3
source share

I had the same problem with the python32 port on my X Lion 10.7.5 OS and fixed it simply by installing the py32-tkinter port. I checked and already installed X11. Thanks.

0
source share

All Articles