Using Mac Finder Manager, navigate to your Downloads directory, and double-click on the python-3.6.5-macosx10.6.pkg file to install Python, Tkinter, and IDLE. Use the default options. (It's OK to delete the python-3.6.5-macosx10.6.pkg file after the installation is complete.) Open a Terminal window. The official home of the Python Programming Language. Python Releases for Mac OS X. Latest Python 3 Release - Python 3.9.0; Latest Python 2 Release - Python 2.7.18. The story behind the name IDLE is similar to Python. Guido Van Rossum named Python after the British comedy group Monty Python while the name IDLE was chosen to pay tribute to Eric Idle, who was one of the Monty Python's founding members. IDLE comes bundled with the default implementation of the Python language since the 01.5.2b1 release. When using python in IDLE on Mac, each python installation has it’s own /lib/site-packages for 3rd party modules. Depending on your installation method (using the regular pip install package-name ) terminal won’t allow you to import them when using IDLE.
Its worth spending a bit of time describing how to use IDLE. To most, this may not be immediately obvious.
Launch IDLE shell window
To start, we need to open the python shell window. This is the first window you see when you launch the IDLE application. If you haven’t already, drag the IDLE icon from your Launchpad down into the dock. This will ensure it is ever present whenever you wish to launch.
Open editor window
From the shell window, you need to open an editor window. The editor window is where we will write python code. From the IDLE menu bar (click on the shell window to ensure the menu bar is IDLE specific) click File, New File. This will open a new window called “Untitled”
Save File
Its probably a good idea to save the editor window file at this point. This will ensure your code can be saved as you work on it, and it can be retrieved at a later point. From the menu bar, click File, Save As. Each Python file name will have a .py extension. This is provided by default when you name your file.
Write some code
I wanted to prove that my set up worked so I entered some code in the editor window. I wrote a hello world program using the code below. Click File, Save on the IDLE menu when this code has been written in the editor window.
Run program
Executing the code returns (prints) the string values (within quotation marks) stored inside brackets to the python shell window. On the IDLE menu bar click Run, Run Module. This returns the output shown below to the shell window.
Python Idle Mac Crash
Celebrate
Code written and successfully returned to the shell window! To follow on from my previous post, rubber has in fact hit the road. I now have a set up that works and the tools that I need to start learning Python.
Idle Python Gui
Sidenote – The Python.org website has a a comprehensive guide on using IDLE which goes well beyond this post. For more detail, this is a great place to look.