classification
Title: IDLE won't run
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Unable to run IDLE without write-access to home directory
View: 8231
Assigned To: Nosy List: Bozdog, ned.deily, roger.serwy
Priority: normal Keywords:

Created on 2013-04-28 18:22 by Bozdog, last changed 2015-10-24 21:00 by terry.reedy. This issue is now closed.

Messages (11)
msg188011 - (view) Author: Ben Read (Bozdog) Date: 2013-04-28 18:22
I am installing Python 3.31 on a Mac running OS 10.8.2 and have already installed ActiveTCL 8.5.13. When I try and launch IDLE, the icon appears on the dock for a second and then disappears and the application doesn't run. I have already installed both Python and Active TCL in the same way on two other Macs and it has run just fine, so I don't know why it's not running on this one. Is there anything specific that would cause this to happen?

Thanks,
Ben
msg188013 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-28 19:04
How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE.
msg188018 - (view) Author: Ben Read (Bozdog) Date: 2013-04-28 20:21
Hi there,

I'm launching IDLE from Applications in Finder (double clicking the application file). 

I've tried doing this while Console is open and the response is:

28/04/2013 21:17:19.271 Dock[167]: no information back from LS about running process

Thanks,

Ben
On 28 Apr 2013, at 20:04, Ned Deily <report@bugs.python.org> wrote:

> 
> Ned Deily added the comment:
> 
> How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE.
> 
> ----------
> nosy: +ned.deily
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue17864>
> _______________________________________
msg188021 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-28 20:59
OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing:

/usr/local/bin/python3.3 -c 'import sys;print(sys.version)'
/usr/local/bin/python3.3 -m idlelib

and report what messages you see there.

Also, are there any other messages with "com.apple.launchd.peruser" or "org.python.IDLE" immediately before that one?  You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports.  You could use Activity Monitor.app to see if there is already an IDLE or Python process running.  If you can, try logging -out and -in and/or rebooting.  And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else?
msg188028 - (view) Author: Ben Read (Bozdog) Date: 2013-04-28 22:04
In response to the first command:

3.3.1 (v3.3.1:d9893d13c628, Apr  6 2013, 11:07:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

…and the second command:

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

I've checked console and activity monitor and cannot see any further reference to IDLE. The message I sent previously was the only one shown in 'All Messages' after a marker I added to know where to start from. 

I downloaded Python 3.31 from the official site and selected the 64bit version. I ran the ActiveTCL 8.5.13 download first. 

Thanks,

Ben

On 28 Apr 2013, at 21:59, Ned Deily <report@bugs.python.org> wrote:

> 
> Ned Deily added the comment:
> 
> OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing:
> 
> /usr/local/bin/python3.3 -c 'import sys;print(sys.version)'
> /usr/local/bin/python3.3 -m idlelib
> 
> and report what messages you see there.
> 
> Also, are there any other messages with "com.apple.launchd.peruser" or "org.python.IDLE" immediately before that one?  You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports.  You could use Activity Monitor.app to see if there is already an IDLE or Python process running.  If you can, try logging -out and -in and/or rebooting.  And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else?
> 
> ----------
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue17864>
> _______________________________________
msg188029 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-28 22:43
That's really odd.  It looks you have a permissions problem with your home directory. On startup, IDLE attempts to create the directory .idlerc in your home directory, /Users/ben, if it doesn't exist already.  If for some reason the directory creation fails, IDLE aborts.  Interestingly, if the directory exists but IDLE lacks write permission to create files in it, it does not abort but posts a warning message in a window.  Perhaps it could be a little more consistent about that.  But still, this appears to be avery unusual situation.  I can't think of any reason why IDLE would be unable to create a directory unless you have some security system installed or some unusual access control list setting.  The most likely reason is just a plain old permission problem on your home directory.  Try this in a terminal session:

cd ~
ls -lde ~

You should see something similar to this:
drwxr-xr-x+ 38 nad  staff  2992 Apr 28 15:26 /Users/nad/
 0: group:everyone deny delete

if the permissions string is missing the "w" ("dr-xr-x"), that means you do not have write permission to your home directory and can't create new directories there.  In that case, 

mkdir ~/.idlerc

should fail.  (This is essentially what IDLE is trying to do.)

If you are missing write permission on your home directory, you *should* be able to fix it by doing:

chmod u+w ~
msg188041 - (view) Author: Ben Read (Bozdog) Date: 2013-04-29 07:22
I've tried this and it looks like write access is already enabled, but I entered the commands you listed all the same - here's the output:

Bens-iMac:~ ben$ cd
Bens-iMac:~ ben$ ls -lde
drwxr-xr-x  28 temp  staff  952 28 Apr 18:46 .
Bens-iMac:~ ben$ mkdir /.idlerc
mkdir: /.idlerc: Permission denied
Bens-iMac:~ ben$ chmod u+w
usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Bens-iMac:~ ben$ mkdir /.idlerc
mkdir: /.idlerc: Permission denied

On 28 Apr 2013, at 23:43, Ned Deily <report@bugs.python.org> wrote:

> 
> Ned Deily added the comment:
> 
> That's really odd.  It looks you have a permissions problem with your home directory. On startup, IDLE attempts to create the directory .idlerc in your home directory, /Users/ben, if it doesn't exist already.  If for some reason the directory creation fails, IDLE aborts.  Interestingly, if the directory exists but IDLE lacks write permission to create files in it, it does not abort but posts a warning message in a window.  Perhaps it could be a little more consistent about that.  But still, this appears to be avery unusual situation.  I can't think of any reason why IDLE would be unable to create a directory unless you have some security system installed or some unusual access control list setting.  The most likely reason is just a plain old permission problem on your home directory.  Try this in a terminal session:
> 
> cd ~
> ls -lde ~
> 
> You should see something similar to this:
> drwxr-xr-x+ 38 nad  staff  2992 Apr 28 15:26 /Users/nad/
> 0: group:everyone deny delete
> 
> if the permissions string is missing the "w" ("dr-xr-x"), that means you do not have write permission to your home directory and can't create new directories there.  In that case, 
> 
> mkdir ~/.idlerc
> 
> should fail.  (This is essentially what IDLE is trying to do.)
> 
> If you are missing write permission on your home directory, you *should* be able to fix it by doing:
> 
> chmod u+w ~
> 
> ----------
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue17864>
> _______________________________________
msg188057 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-29 09:37
The "ls" shows that, for some reason, your home directory is owned by user "temp", not by user "ben". That's not good.  Try doing this:

sudo chown ben /Users/ben/

But we're way past an IDLE or Python problem here.  This is a basic Unix system administration issue.
msg188072 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2013-04-29 15:03
This looks like a duplicate of issue8231.
msg188113 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-29 22:09
Ah, yes, it is a duplicate, thanks.  Let's move any further discussion to Issue8231.
msg188181 - (view) Author: Ben Read (Bozdog) Date: 2013-04-30 19:47
Good news - ran the sudo command, entered the password but I could still not make the directory, but I could within Finder - this time without a password. Tried the IDLE application again and it now works. 

Thank you once again for your help in resolving this. 

Regards,

Ben

Begin forwarded message:

> From: Ben Read <ben@denmarkfarmbarn.co.uk>
> Subject: Re: [issue17864] IDLE won't run
> Date: 29 April 2013 22:12:03 BST
> To: Python tracker <report@bugs.python.org>
> 
> Thank you for getting me this far - it's funny that Python has been the program to make this problem apparent, but looking closer, there are other issues such as not being able to create a new folder in the user folder without entering username and password.
> 
> I appreciate your help in diagnosing the problem.
> 
> Ben
> 
> 
> On 29 Apr 2013, at 10:37, Ned Deily <report@bugs.python.org> wrote:
> 
>> 
>> Ned Deily added the comment:
>> 
>> The "ls" shows that, for some reason, your home directory is owned by user "temp", not by user "ben". That's not good.  Try doing this:
>> 
>> sudo chown ben /Users/ben/
>> 
>> But we're way past an IDLE or Python problem here.  This is a basic Unix system administration issue.
>> 
>> ----------
>> 
>> _______________________________________
>> Python tracker <report@bugs.python.org>
>> <http://bugs.python.org/issue17864>
>> _______________________________________
>
History
Date User Action Args
2015-10-24 21:00:02terry.reedysetsuperseder: Unable to run IDLE without write-access to home directory
2013-04-30 19:47:25Bozdogsetmessages: + msg188181
title: IDLE fails to launch when it cannot create .idlerc directory -> IDLE won't run
2013-04-29 22:09:11ned.deilysetstatus: open -> closed
title: IDLE won't run -> IDLE fails to launch when it cannot create .idlerc directory
messages: + msg188113

resolution: duplicate
stage: resolved
2013-04-29 15:03:35roger.serwysettype: crash -> behavior

messages: + msg188072
nosy: + roger.serwy
2013-04-29 09:37:12ned.deilysetmessages: + msg188057
2013-04-29 07:22:14Bozdogsetmessages: + msg188041
2013-04-28 22:43:41ned.deilysetmessages: + msg188029
2013-04-28 22:04:42Bozdogsetmessages: + msg188028
2013-04-28 20:59:07ned.deilysetmessages: + msg188021
2013-04-28 20:21:06Bozdogsetmessages: + msg188018
2013-04-28 19:04:23ned.deilysetnosy: + ned.deily
messages: + msg188013
2013-04-28 18:22:17Bozdogcreate