Opened 3 years ago

Last modified 3 years ago

#64707 closed defect

py39-tkinter: _tkinter.TclError: no display name and no $DISPLAY environment variable — at Version 1

Reported by: programmingkidx Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-tkinter

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I installed the py39-tkinter port and tried to run idle. What happened is I saw this error message in Python3.9:

Traceback (most recent call last):
  File "/opt/local/bin/idle", line 5, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/pyshell.py", line 1490, in main
    root = Tk(className="Idle")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

My info:

Core i7 MacBook Pro

Mac OS 10.14.6

Python 3.9

Change History (1)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: $DISPLAY tkinter idle removed
Port: py-tkinter added; py39-tkinter removed
Summary: _tkinter.TclError: no display name and no $DISPLAY environment variablepy39-tkinter: _tkinter.TclError: no display name and no $DISPLAY environment variable

It works fine for me on macOS 10.15, but I have an X11 server installed. Do you? If not, you can do so by installing the xorg-server port and following the instructions it prints.

Note: See TracTickets for help on using tickets.