You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

IDLE/Python

I was using the IDLE program when IDLE immediately closed and now i cannot reopen it.

What can I do?

MacBook Pro 13″, macOS 12.0

Posted on Nov 21, 2021 10:56 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 21, 2021 11:11 AM

Did you review the document that was indicated in the message window? If so, and it didn't help, I suggest contacting the IDLE developer for further assistance with this issue.


Ref: How to contact an app developer - Apple Support

7 replies

Nov 21, 2021 11:34 AM in response to Lodovik06

Simply the idle tool in Monterey is based on the Python 2.7.18 distribution that Apple bundles with the operating system. It launches to an entirely black panel, as does its Preference pane, so it is useless due to its dependency on a long since deprecated Tk/Tcl 8.5.9 interface library.


That leaves idle3 from the current Python 3.10.0 distribution at Python.org. That launches normally, either from the Terminal as below, or from /Applications/Python 3.10/IDLE, with the following display:

idle3 &



This version of Python is built and bundled using the Tk/Tcl 8.6.11 library and works correctly. I suggest you reboot your Mac, ensure that you have a working Internet connection, and then relaunch idle3 as I did above. See if the problem reoccurs.

Dec 15, 2021 1:49 PM in response to Lodovik06

Python scripts have a .py extension. Period. The IDLE application is not for opening Python scripts, or as a substitute as a Python editor. You should use it to interactively test individual lines of code, small blocks of Python code, or functions. Get a programmer's editor (e.g. BBEdit, Sublime Text 4, etc.) that understands Python and use that. Put the following as the first line in your Python3 code:


#!/usr/bin/env python3


and then from the Desktop make that Python script executable, and run it:

cd Desktop
chmod +x ./Calcolatrice.py
./Calcolatrice.py


IDLE/Python

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.