Cannot open idle on Mac

10,713

Here is the diagnosis and solution, by Ned Deily on the Python tracker, that worked for Steve.

It appears that if the Files & Folder security setting is set to disallow access to your Documents Folder, IDLE.app will fail on startup but it will launch from the command line. Check the following in System Preferences.

Apple Menu (upper left corner) -> System Preferences -> Security & Privacy. Then click on the Privacy tab, scroll to and click on Files and Folders, then look for a Python.app (not IDLE.app) entry. It should have a Documents Folder entry underneath it and it should be checked (enabled). If not, click it (you might need to click on the lock in the lower left corner to enable changes).

Share:
10,713

Related videos on Youtube

Steve Hu
Author by

Steve Hu

Updated on June 04, 2022

Comments

  • Steve Hu
    Steve Hu almost 2 years

    I have python3.7.2 and idle installed on my mac, both of them came from the official installation package, run without problem for months, until recently I changed my terminal shell to zsh and also installed another version of python when homebrew is trying to have it as a dependency.

    Then today any .py file cannot be opened by the idle app, I uninstalled the homebrew version of python, removed the frameworks and the links in /usr/local/bin, but the idle app still cannot be opened. Although the app version cannot be opened, it can be opened by "idle3" in my command line. What's more the python launcher works just fine. Then I removed all the versions of python3 installed, used app cleaner to clean the saved state stuff and cleaned all the links used by python3 in /usr/local/bin. Later I installed the python3.7.7 and idle using official .pkg installer. Still idle cannot be opened by double clicking on it. But this time things get even worse, the idle can be opened indirectly sometimes at a nearly random probability if I try to double click on .py files. And even python launcher cannot open .py files in terminal. Now I have no idea how things are going. Can anyone help to analyze how this kind of weird problem occurred?

    • Terry Jan Reedy
      Terry Jan Reedy about 4 years
      If you are 'upgraded' 10.15 Catalina, the first part of this may give a possible reason and solution. bugs.python.org/issue39927
    • Steve Hu
      Steve Hu about 4 years
      @TerryJanReedy Thanks so much, I just found that the problem occurred due to privacy settings mentioned in your link, now the problem is gone.