You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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=Noneclosed_at=<Date2017-12-30.19:42:58.151>created_at=<Date2017-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=<Date2018-01-02.15:15:27.452>user='https://bugs.python.org/sm1979'
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.
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?
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.
sm1979 commented on Dec 30, 2017
sm1979mannequin
MannequinAuthor
More actions
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!
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".
sm1979 commented on Dec 30, 2017
sm1979mannequin
MannequinAuthor
More actions
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$
Just to be sure, please try again with the command as Ronald requested, i.e. include the tilde "~":
ls -led ~
sm1979 commented on Dec 30, 2017
sm1979mannequin
MannequinAuthor
More actions
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$
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:
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.
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.
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.
Activity
sm1979 commentedon Dec 29, 2017
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.
terryjreedy commentedon Dec 29, 2017
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?
ned-deily commentedon Dec 29, 2017
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.
sm1979 commentedon Dec 30, 2017
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!
ronaldoussoren commentedon Dec 30, 2017
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 ~ $ idThe 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".
sm1979 commentedon Dec 30, 2017
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$
ned-deily commentedon Dec 30, 2017
Just to be sure, please try again with the command as Ronald requested, i.e. include the tilde "~":
ls -led ~
sm1979 commentedon Dec 30, 2017
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$
ned-deily commentedon Dec 30, 2017
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!
ned-deily commentedon Dec 30, 2017
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.
terryjreedy commentedon Dec 30, 2017
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.
sm1979 commentedon Jan 2, 2018
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.