how do I launch IDLE, the development environment for Python, on Mac OS 10.7?
Asked Answered
S

11

48

I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight.

Sybilla answered 9/1, 2012 at 16:50 Comment(2)
I typed /usr/bin/idle2.7 at the command line, and that seemed to work.Sybilla
if you are using pyenv for Python environments management and want IDLE work there is step by step guide #61871188Lacilacie
J
64

In the stock Mac OS X python installation, idle is found in /usr/bin, which is not (easily) accessible from Finder and not indexed by Spotlight. The quickest option is to open the Terminal utility and type 'idle' at the prompt. For a more Mac-like way of opening it, you'll have to create a small app or shortcut to launch /usr/bin/idle for you (an exercise left to the reader).

Jacelynjacenta answered 9/1, 2012 at 17:11 Comment(2)
It worked for me too. Thanks. I'm using Mac Yosemite.Paleozoology
If you have python3 installed you can run the command idle3 to open up idle using python3Boyes
U
33

When you open up a new terminal window, just type in

idle


Enter command in terminal

Then you will see a little rocket icon show up as IDLE loads

rocket

Then the Python shell opens up for you to edit

Python Shell

Unschooled answered 14/5, 2013 at 17:59 Comment(1)
how do i enter the editor why is there only a shell window but no editor window? usually idle has both windowsJarrod
P
15

I think the shell command is

 python -m idlelib.idle 

but i am not a mac user so i can't test.

Precincts answered 9/1, 2012 at 16:53 Comment(2)
I can confirm that this works on mac, but there is no benefit over just typing idleSoccer
python -m idlelib.idle <file> opens the file and can set breakpoint.Afrikaans
P
13

One way to run IDLE from spotlight or an icon in the Applications folder is to build a quick Automation for it. As mentioned by other commentators, this probably isn't necessary for Python 3, as it creates a shortcut automatically, and some hand-installed versions have tools to do this automatically. But if you want to roll your own:

  1. You'll need to know the terminal command to open your version of IDLE. On my Mac right now (early 2016), running python 2.7.10, it is "idle2.7"
  2. Using spotlight, or in the Utilities folder, open "Automator"
  3. Choose an "Application" type document.
  4. Make sure "Actions" is selected in the gray bar, upper left.
  5. In the actions column, find "Run Shell Script" and double-click it, or drag it to the workflow area on the right.
  6. Enter the terminal command in the parameters box that appears.
  7. Save your automation (I called mine "IDLE" and put it in the Applications folder, to make it easy).
  8. It's now available (as soon as spotlight indexes it) via all the normal methods. The only side-effect will be that while it's running, your menu bar will have a spinning gear over in the tray area next to the clock. This indicates an automation workflow is running. Once you close IDLE, it will go away.
Poddy answered 20/1, 2016 at 18:38 Comment(0)
B
3
  1. first to launch the terminal CMD+space
  2. second to input idle3
  3. the idle will be activated automatically.
Bahaism answered 22/7, 2017 at 13:57 Comment(0)
R
2

The answer of Matthewm1970 works like a charm! And if you add an & to your shell command, the automation script will end immediately. There is no spinning gear. Like so:

/usr/local/bin/idle3.5&

Note the ampersand.

Cheers.

-melle

Roz answered 23/2, 2016 at 19:18 Comment(0)
G
1
  1. After you launch idle from the command line (make sure idle shell window has focus), click File, click "New File". A new window opens; this is your editor.

  2. Type your program in the editor. Click "File", click "Save As...". Save your file somewhere with any name you choose, and a ".py" extension to the file name.

  3. Click "Run", click "Run Module" (or, F5). Assuming no errors, the results will appear in the Shell window. Edit your file & repeat as necessary.

Grandstand answered 30/9, 2015 at 23:50 Comment(0)
D
1
  1. open Terminal
  2. type "idle" and press enter
  3. right click on "Python" icon > Options > Keep in Dock enter image description here
Dingdong answered 25/3, 2021 at 13:3 Comment(0)
E
0

so for python 3.4.3 in applications a folder named "python 3.4" click that and click IDLE.

for python 2.7.9 go here https://www.python.org/downloads/ and get 2.7.9 and a folder named "python 2.7" click that and click IDLE.

Expulsion answered 30/4, 2015 at 21:52 Comment(0)
G
0

As to the earlier questions about starting IDLE: you can certainly start it from the command line. Also, if you installed Python using Homebrew, you can run 'brew linkapps' (from the command line); that will place an app for IDLE (among other things) in Launchpad (Applications folder).

Grandstand answered 1/10, 2015 at 3:1 Comment(0)
P
0

As of March 2023, Python Releases for macOS at python.org contains "universal releases" that work on both Intel and Mn (eg, M1, M2) Macs.

These installations place a Python (eg Python 3.10) folder in Applications. The folder includes an IDLE app, which opens an independent IDLE shell for that specific Python version.

Further info, including this note, is in the ReadMe file:

Using IDLE or other Tk applications

This package includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.

Due to new security checks on macOS 10.15 Catalina, when launching IDLE macOS may open a window with a message "Python" would like to access files in your Documents folder. This is normal as IDLE uses your Documents folder as its default when opening and saving files; you can still choose other locations in the Open and Save file dialog windows. Click on the OK button to proceed.

Philanthropic answered 8/3, 2023 at 21:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.