New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE shell won't open on Mac OS 10.13.1 #76628
Comments
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
|
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 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. |
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 Warning: unable to create user config directory 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 In particular the mode at the start should start with "drwx". |
OK, those commands give: iMac:~ Steve Margetts$ ls -led |
Just to be sure, please try again with the command as Ronald requested, i.e. include the tilde "~": ls -led ~ |
Including tilde... Last login: Sat Dec 30 10:47:07 on ttys001 |
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! |
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. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: