Skip to content

IDLE shell won't open on Mac OS 10.13.1 #76628

Closed

Description

@sm1979
mannequin
BPO 32447
Nosy @terryjreedy, @ronaldoussoren, @ned-deily
Superseder
  • bpo-8231: Unable to run IDLE without write-access to home directory
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-12-30.19:42:58.151>
    created_at = <Date 2017-12-29.16:43:59.606>
    labels = ['OS-mac', 'invalid', 'expert-IDLE', 'type-bug', 'expert-installation']
    title = "IDLE shell won't open on Mac OS 10.13.1"
    updated_at = <Date 2018-01-02.15:15:27.452>
    user = 'https://bugs.python.org/sm1979'

    bugs.python.org fields:

    activity = <Date 2018-01-02.15:15:27.452>
    actor = 'sm1979'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-12-30.19:42:58.151>
    closer = 'ned.deily'
    components = ['IDLE', 'Installation', 'macOS']
    creation = <Date 2017-12-29.16:43:59.606>
    creator = 'sm1979'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32447
    keywords = []
    message_count = 12.0
    messages = ['309180', '309194', '309195', '309226', '309228', '309231', '309238', '309239', '309246', '309248', '309252', '309373']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'ronaldoussoren', 'ned.deily', 'sm1979']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = '8231'
    type = 'behavior'
    url = 'https://bugs.python.org/issue32447'
    versions = ['Python 3.6']

    Activity

    1. sm1979 commented on Dec 29, 2017

      sm1979mannequin
      MannequinAuthor

      I am trying to install Python on a Max running OS 10.13.1 (so my son can use a 'Coding for Beginners' book). Both 2.7 and 3.6 have the same problem: Clicking on IDLE leads to the icon bouncing a couple of times in the dock, but not opening a shell. I have tried re-installing and restarting post install. Typing python or python3.6 into the terminal seems to launch Python successfully (details below). I am as new to coding as my son, please phrase any advice accordingly!

      Thank you.

      Last login: Fri Dec 29 16:26:57 on ttys000
      mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
      touch: /Users/Steve Margetts/.bash_sessions/79B2448C-E769-409D-A67D-7A96F8C3C348.historynew: No such file or directory
      iMac:~ Steve Margetts$ python
      Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12) 
      [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> help
      Type help() for interactive help, or help(object) for help about object.
      >>>

      Last login: Fri Dec 29 16:30:16 on ttys000
      mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
      touch: /Users/Steve Margetts/.bash_sessions/5A516AB8-0481-4D55-A2BD-1B1017E52147.historynew: No such file or directory
      iMac:~ Steve Margetts$ python3.6
      Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
      [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.

      >>

    2. added
      type-bug
      on Dec 29, 2017
    3. terryjreedy commented on Dec 29, 2017

      @terryjreedy
      Member

      IDLE uses Python's tcl/tk interface module, called 'tkinter'. Tcl is a separate language and tk is its graphical user interface. This is most likely the problem. Did you follow the advice at
      https://www.python.org/download/mac/tcltk/
      to install tcl/tk 8.5.18? Make sure you read the whole page.

      To test better, run 'import tkinter' at Python's interactive '>>>' prompt. Any error message? If that works, run 'python3.6 -m idlelib' and/or 'python -m idlelib.idle' at the terminal '...$' prompt. Does that display an error message?

    4. ned-deily commented on Dec 29, 2017

      @ned-deily
      Member

      Those messages at the top of your terminal sessions are pretty suspicious, e.g. "Permission denied" and "No such file or directory". They suggest a home directory ownership or permissions issue which you should investigate. But definitely try running IDLE from the terminal window as Terry suggests. If nothing else, you may see more informative error messages.

    5. sm1979 commented on Dec 30, 2017

      sm1979mannequin
      MannequinAuthor

      Thanks for the help. I've installed ActiveTCL 8.5.18.0 as per the Python recommendation. Running from terminal:

      Last login: Fri Dec 29 16:46:22 on ttys001
      mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
      touch: /Users/Steve Margetts/.bash_sessions/224C387E-8E74-4020-A5CC-F275EFB79EAE.historynew: No such file or directory
      iMac:~ Steve Margetts$ python3.6
      Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) 
      [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import tkinter
      >>>

      Did not bring up any error message. However, subsequently trying to run IDLE from terminal brought up:

      Last login: Sat Dec 30 10:42:04 on ttys000
      mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
      touch: /Users/Steve Margetts/.bash_sessions/58F5E574-277D-4413-9B03-4B24ED9B4C21.historynew: No such file or directory
      iMac:~ Steve Margetts$ python3.6 -m idlelib

      Warning: unable to create user config directory
      /Users/Steve Margetts/.idlerc
      Check path and permissions.
      Exiting!

      iMac:~ Steve Margetts$

      Does this look like a permissions issue? If so, any idea what to try next? I'm logged on as an administrator on a home computer. Is this likely to be a security setting issue? Thanks again for any help - I'm a child of the GUI and the last time I coded anything was in BBC Basic!

    6. ronaldoussoren commented on Dec 30, 2017

      @ronaldoussoren
      Contributor

      There appears to be a permission issue with the home directory.

      What's the output of the following commands in a terminal window:

      $ ls -led ~
      $ id

      The home directory should be owned by the "uid" shown by the second command, and should be writable by the user, the output of "ls" should show something like this:

      drwxr-xr-x@ 336 ronald staff 10752 Dec 30 12:52 /Users/ronald
      0: group:everyone deny delete

      In particular the mode at the start should start with "drwx".

    7. sm1979 commented on Dec 30, 2017

      sm1979mannequin
      MannequinAuthor

      OK, those commands give:

      iMac:~ Steve Margetts$ ls -led
      drwxr-xr-x 21 501 staff 714 30 Dec 10:40 .
      iMac:~ Steve Margetts$ id
      uid=503(Steve Margetts) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)
      iMac:~ Steve Margetts$

    8. ned-deily commented on Dec 30, 2017

      @ned-deily
      Member

      Just to be sure, please try again with the command as Ronald requested, i.e. include the tilde "~":

      ls -led ~

    9. sm1979 commented on Dec 30, 2017

      sm1979mannequin
      MannequinAuthor

      Including tilde...

      Last login: Sat Dec 30 10:47:07 on ttys001
      mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
      touch: /Users/Steve Margetts/.bash_sessions/8B76B0D2-2C88-4FE0-A8F6-C7FB8C13A2A8.historynew: No such file or directory
      iMac:~ Steve Margetts$ ls -led ~
      drwxr-xr-x 21 501 staff 714 30 Dec 10:40 /Users/Steve Margetts
      iMac:~ Steve Margetts$

    10. ned-deily commented on Dec 30, 2017

      @ned-deily
      Member

      OK, that confirms that your home directory permissions are incorrect. Not sure how that happened, possibly by an inadvertent chown command. Note that you need to be careful when using shell commands because your user name has a space character in it, so you have to be sure to enclose it in quotes in the shell ("Steve Margetts") and there may be third-party scripts that don't handle that case well; generally, it's best to avoid using spaces in the Unix login name. Anyway, there are several ways to correct the problem but it looks like the easiest might be to use a procedure that Apple provides to reset permissions. It is described here:

      https://www.macobserver.com/tmo/article/os-x-repair-home-folder-permissions

      Good luck!

    11. ned-deily commented on Dec 30, 2017

      @ned-deily
      Member

      P.S. You might consider creating a new account without the embedded space and moving your files there; it will probably cause other problems for you in the future. I notice that the current System Preferences -> Users & Groups interface won't even let you create a login account with a space in it.

    12. terryjreedy commented on Dec 30, 2017

      @terryjreedy
      Member

      The Mac issue is the inability to add .xyz directories to the home directory. You can test a fix by entering 'mkdir .idlerc' at the terminal prompt.

      The IDLE issue is that IDLE quits when it cannot create .idlerc. In this respect, this is a duplicate of bpo-8231. That this can happen after what seemed like a 'normal' install (on a home machine?) gives me a bit more impetus to work on that issue.

    13. removed their assignment
      on Dec 30, 2017
    14. sm1979 commented on Jan 2, 2018

      sm1979mannequin
      MannequinAuthor

      OK, so I created a profile for my son (single name without any spaces!) and that seems to allow both Python and IDLE to work fine. I'll try and sort out my profile slow time - it doesn't seem to be causing any other issues just now. Thanks for the guidance.

    15. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      OS-mactopic-IDLEtopic-installationtype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions