How get IDLE.app for python311 to work?
Murray Eisenberg
murrayeisenberg at gmail.com
Tue Mar 7 21:08:22 UTC 2023
The line "export DISPLAY=:0: was in ~/.zprofile. I'ts now commented out.
That did it - thanks!
> On Mar 7, 2023, at 3:19 PM, Eric <eric.hoch2 at gmail.com> wrote:
>
> Murray,
>
> take a look at your bashrc/zshrc or bash_profile/zprofile or even profile if you have an entry like "export DISPLAY=:0" and comment it out.
>
> Be aware that those files are hidden and have a dot in front of them.
>
> Eric
>
> On Tue, Mar 7, 2023 at 6:41 PM Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
>> More:
>>
>> (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.
>>
>> (5) I now install py311-tkinter and execute "idle" again. This time I get error:
>>
>> Traceback (most recent call last):
>> File "/opt/local/bin/idle", line 5, in <module>
>> main()
>> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/idlelib/pyshell.py", line 1608, in main
>> root = Tk(className="Idle")
>> ^^^^^^^^^^^^^^^^^^^^
>> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 2326, in __init__
>> self.tk <http://self.tk/> = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> _tkinter.TclError: couldn't connect to display ":0"
>>
>>
>>> On Mar 7, 2023, at 11:35 AM, Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
>>>
>>> (1) If from /Applications/MacPorts/Python 3.11 I open IDLE.app, then nothing happens.
>>>
>>> (2)If first I run XQuartz.app and from its Appliantions menu selet Terminal, thereby getting a new Terminal-like window, and
>>> if I now open /Applications/MacPorts/Python 3.11 I open IDLE.app, still nothing happens.
>>>
>>> (3) If instead now I open /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE, then I get a new Terminal window showing:
>>>
>>> /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;
>>> [~] % /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;
>>> ** IDLE can't import Tkinter.
>>> Your Python may not be configured for Tk. **
>>> /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;
>>> [~] % /Applications/MacPorts/Python\ 3.11/IDLE.app/Contents/MacOS/IDLE ; exit;
>>> ** IDLE can't import Tkinter.
>>> Your Python may not be configured for Tk. **
>>>
>>> What is installed are:
>>>
>>> python311 @3.11.2_0+lto+optimizations+universal
>>> tk @8.6.13_0+x11
>>>
>>> How do I get IDLE.app to work??
>>>
>>> ---
>>> Murray Eisenberg murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>
>>> Mobile (413)-427-5334
>>> 503 King Farm Blvd #101
>>> Rockville, MD 20850-6667
>>>
>>>
>>>
>>
>> ---
>> Murray Eisenberg murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>
>> Mobile (413)-427-5334
>> 503 King Farm Blvd #101
>> Rockville, MD 20850-6667
>>
>>
>>
>
>
> --
> Eric Hoch
> mailto: eric.hoch2 at gmail.com <mailto:eric.hoch2 at gmail.com>
---
Murray Eisenberg murrayeisenberg at gmail.com
Mobile (413)-427-5334
503 King Farm Blvd #101
Rockville, MD 20850-6667
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230307/1651c3c3/attachment.htm>
More information about the macports-users
mailing list