<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">More:<div><br></div><div>(4) In Terminal, "which idle" shows /opt/local/bin/idle. If I run idle, I get the same "IDLE can't import TKinter" error as before.</div><div><br></div><div>(5) I now install py311-tkinter and execute "idle" again. This time I get error:</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "/opt/local/bin/idle", line 5, in <module></div><div> main()</div><div> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/idlelib/pyshell.py", line 1608, in main</div><div> root = Tk(className="Idle")</div><div> ^^^^^^^^^^^^^^^^^^^^</div><div> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 2326, in __init__</div><div> self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>_tkinter.TclError: couldn't connect to display ":0"</div><div><br></div><div><br><blockquote type="cite"><div>On Mar 7, 2023, at 11:35 AM, Murray Eisenberg <murrayeisenberg@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=us-ascii"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">(1) If from /Applications/MacPorts/Python 3.11 I open IDLE.app, then nothing happens.<div><br></div><div>(2)If first I run XQuartz.app and from its Appliantions menu selet Terminal, thereby getting a new Terminal-like window, and </div><div>if I now open /Applications/MacPorts/Python 3.11 I open IDLE.app, still nothing happens.</div><div><br></div><div>(3) If instead now I open /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE, then I get a new Terminal window showing:</div><div><br></div><div>/Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;</div><div>[~] % /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;</div><div>** IDLE can't import Tkinter.</div><div>Your Python may not be configured for Tk. ** </div><div><div>/Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;</div><div>[~] % /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;</div><div>** IDLE can't import Tkinter.</div><div>Your Python may not be configured for Tk. **</div></div><div><br></div><div>What is installed are:</div><div><br></div><div>python311 @3.11.2_0+lto+optimizations+universal</div><div>tk @8.6.13_0+x11</div><div><br></div><div>How do I get IDLE.app to work??</div><div><br></div><div><div>
<div>---<br>Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;"> </span>murrayeisenberg@gmail.com<br>Mobile (413)-427-5334<br>503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;"> </span><br>Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></div></div></blockquote></div><br><div>
<div>---<br>Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;"> </span>murrayeisenberg@gmail.com<br>Mobile (413)-427-5334<br>503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;"> </span><br>Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></div></div></body></html>