3

I recently attempted to install python 3.2 along with IDLE 3 on my macbook pro. I successfully installed python 3.2 (as in, I can run it from the terminal), but when I attempted to install IDLE 3.2 I must have done something wrong because now both IDLE 2.7 and IDLE 3.2 crash immediately upon opening with the message "Python quit unexpectedly", no matter whether I open it through the terminal or through finder. Does anyone know how to fix this? I have installed the correct ActiveTCL package (and reinstalled) and still nothing. I have attempted to reinstall python 3.2 and IDLE 3 but I am not sure whether I did it correctly. Through a good amount of googling I found some people say that it was most likely a path issue but all of the solutions I found were using Windows so I am not sure how to apply that to my mac.

Alex K
  • 8,269
  • 9
  • 39
  • 57
drewlaqua
  • 101
  • 2
  • 6
  • Try `import idlelib.idle` at the Python prompt, or `python /System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/idlelib/idle.py` at the Bash prompt. – CoffeeRain Feb 21 '12 at 19:52
  • "import idlelib.idle" caused the same crash as before and the other command said there was no such file or directory. So i copied the "3.2" folder from /Library/Frameworks/Python.framework/Versions to the /System/Library/Frameworks/Python.framework/Versions folder and then re-entered the command. This is what I got: "Your Python may not be configured for Tk. **", file=sys._stderr_) SyntaxError: invalid syntax – drewlaqua Feb 21 '12 at 20:17
  • You may not have the right version of TKinter installed. Try looking at [this](http://www.python.org/getit/mac/tcltk/). – CoffeeRain Feb 21 '12 at 20:20
  • I have 8.5.11 installed. That is the correct one, right? – drewlaqua Feb 21 '12 at 20:21
  • Never modify or delete files in `/System/Library`, which is part of OS X and managed by Apple. There are no Python 3 releated files in `/System/Library` since Apple has yet to release a version of Python 3 in OS X. If you installed Python 3.2 using a python.org installer, its files will be in `/Library/Frameworks`. – Ned Deily Feb 22 '12 at 01:28
  • I did not delete or replace anything in /System/Library and i know the folder is in /Library/Frameworks. That is pretty irrelevant to what I was asking but a still a good point i suppose. – drewlaqua Feb 22 '12 at 01:36
  • Yes, but you said you copied the 3.2 folder to /System/Library. That in itself is not a problem since there is no 3.2 folder in /System/Library. But if someone followed that pattern and copied, say, a 2.7 folder from /Library to /System/Library, that would wipe out the Apple-supplied system Python 2.7 in 10.7. – Ned Deily Feb 22 '12 at 23:02

5 Answers5

1

If you are running Mac OS X Lion, it sounds like you are being bitten by the saved-state crash. You need to delete the saved state to make the crash go away:

http://osxdaily.com/2011/07/17/delete-specific-application-saved-states-from-mac-os-x-10-7-lion-resume/

http://reviews.cnet.com/8301-13727_7-20083707-263/managing-mac-os-x-lions-application-resume-feature/

  • Thanks for your reply, but it didnt work for me. It still crashes. – drewlaqua May 01 '12 at 04:46
  • Didn't work for me either. IDLE v3.2.3 python v3.2.3 and tk v8.5. However, great link for the saved-state (new to lion here) and I was happy about chflags nohidden ~/Library – Jesse Black Sep 29 '12 at 06:53
1

I had the same issue. I run OSX 10.8.5, Python 3.3.3 and IDLE 3.3.3 and reinstalling Python haven't been a solution. I solved any problem removing the ~/.idlerc directory. My problem showed for the first time when I tried to change some Preferences (IDLE->Preferences->General->Startup Preferences->At Startup Open Edit Window), so I suppose that's why resetting my Preferences deleting ~/.idlerc folder have been the solution.

edoberto
  • 11
  • 1
1

Try renaming or removing the directory ~/.idlerc which is about the only thing used by Python that would in common to IDLE for 2.7 and 3.2. If that doesn't help, state exactly which Python 3 you installed, what version of OS X, and show the stack traces from the termination report.

UPDATE: Based on the crash report you've supplied, it appears that Tk is crashing during its initialization of menu items:

...
4   Tcl                             0x00000001013dfa61 Tcl_Panic + 162
5   Tk                              0x000000010151c523 TkpGetColor + 383
6   Tk                              0x0000000101529a25 TkpMenuInit + 156
7   Tk                              0x00000001014ac254 TkMenuInit + 88
8   Tk                              0x000000010152c687 -[TKApplication(TKMenus) _setupMenus] + 53
...

I have not seen any reports of a similar problems when IDLE is used with A/S Tcl/Tk 8.5 on 10.7.3 and I haven't been able to reproduce it myself on 10.7.3. However, the Cocoa Tcl/Tk 8.5 is not the most robust framework out there and it may be susceptible to problems when using languages or input methods other than US or US Extended. Another possibility (more likely) is if you are using some third-party menu enhancement application or preference panel (to add colors to menus perhaps). If those suggestions don't help you to isolate the problem, I suggest you ask on the Tcl Mac mailing list (tcl-mac@lists.sourceforge.net, archived at http://dir.gmane.org/gmane.comp.lang.tcl.mac).

Ned Deily
  • 83,389
  • 16
  • 128
  • 151
  • removing `~/.idlerc` will not mess anything up? – drewlaqua Feb 22 '12 at 20:29
  • ~/.idlerc contains a few files where IDLE stores changed preferences, the names of recently edited files, and the like. It is recreated as needed if not present. – Ned Deily Feb 22 '12 at 22:59
  • I removed all programs that I thought may be "third-party menu enhancement application or preference panel" but I still cannot get it to work. If I reinstall Lion will that fix the problem? – drewlaqua Mar 09 '12 at 01:25
  • It's impossible to say if reinstalling Lion will help. It might. But before that rather drastic step, note that ActiveState has recently released Tcl/Tk 8.5.11.1 with updates for various bugs. If you haven't already installed that version, it would be worth trying that before anything else. http://www.activestate.com/activetcl/downloads – Ned Deily Mar 09 '12 at 03:00
  • I actually installed that earlier but IDLE is still crashing. If i reinstall and then load a backup through Time Machine will the python system files be reinstalled from the disk or from the backup? I suppose that is an option if I need it to be. – drewlaqua Mar 09 '12 at 07:07
  • Python 3 is not shipped by Apple in OS X 10.7 so you don't need to reinstall Lion to reinstall that version of Python; just use the appropriate Python installer. But, again, the crash report you linked to shows Tcl/Tk crashing, not Python. Focus on things that might affect it, particularly in the area of menus: if not add-ons, then system preferences like language (try US English), fonts, input methods. And ask on the Tcl Mac mailing list. Good luck! – Ned Deily Mar 09 '12 at 07:26
  • Is there a way to reinstall the original Tcl/Tk that comes with OSX? It seems like that may have broken from something I did. – drewlaqua Mar 11 '12 at 06:37
0

I had the same problem where IDLE would crash after I opened it on my MAC I ended up updating my computer to OS Yosemite. and the most updated version of python but it still would shut the reason it started was because I tried to change the preferences for certain keys. Resetting the preferences fixed it! I typed mc ~/.idlerc idlerc2 :)

chloe
  • 1
0

[Solved] I had the same problem here using: Yosemite 10.10.2 python 3.4.2

The issue was solved downloading and installing the ActiveTcl 8.5.17.0 version from http://www.activestate.com/activetcl/downloads

Best Regards,

Tchê

Tchê
  • 11
  • 2