IDLE crash when opening on Mac OS X - python

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.

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).

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/

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.

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
:)

[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ĂȘ

Related

Fixing Python 3 tkinter issues on Mac with a virtualenv

I think the short version of this question is: How do I get a virtualenv running Python 3.5 to point to the correct version of ActiveTcl on a Mac?
Here's the longer version:
I'm trying to run this Korg Electribe sample editor project on a Mac. The author has only tested it on Windows, and based on the screenshots, it appears to work. I've been able to run the basic python script fine, but as I mention in an issue that I've opened, the full window turns black after loading a file.
After doing some research, I've found that there is a known issue with Aqua Cocoa Tk, and python.org has provided some instrunctions about how to fix tkinter for Mac OS 10.9 and up. I've attempted installing both of the suggested ActiveTcl (8.5.18.0) as well as the newer 8.6.x.x version without success.
I'm pretty sure this is a different issue than Tkinter not working mac osx el capitan, since the script does run, and the window is drawn properly on launch. It's only after I've attempted to load a .all file (there's a sample file in the Github issue) that the screen goes black.
After some more research, I've found this question that seems related, but is specific to Windows: TKinter in a Virtualenv
I'm under the impression that if I can figure out what to set TCL_LIBRARY to, that I'll be able to make some head-way, but I can't seem to find that information for the packages listed on python.org.
Somewhat related, it would also seem to be helpful if I could figure out which version of Tcl/Tk that tkinter is pointing to from within Python, so if anyone could help with that as well, I'd greatly appreciate it.
Thanks!
I succeeded in using tkinter in a python3 virtualenv on OSX 10.13 by :
installing the official OSX Python 3 from https://www.python.org/
installing activeTcl from https://www.activestate.com/activetcl
creating a new virtualenv
mkvirtualenv myenv --python=python3
locating the tkinter location in the Python3 directory. For me it was here :
/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter
creating a symbolic link in the virtualenv library pointing to the tkinter location
cd ~/.virtualenvs/myenv/lib/python3.6
ln -s /usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter tkinter

Meld has errors on OSX 10.10

I installed Meld 3.14.0 (current version as of this post) via Homebrew on OSX. Whenever I launch it, it gives me this:
Couldn't bind the translation domain. Some translations won't work.
'module' object has no attribute 'bindtextdomain'
2015-08-13 10:35:55.007 Python[2396:32534] *** WARNING: Method userSpaceScaleFactor in class
NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Now it still launches and appears to work ok. I can view the diffs of files, which is what I care about mostly. When I exit though, I get the Mac OSX dialog "Python Quit Unexpectedly" as well as this from the command line:
/usr/local/Cellar/git/2.4.6/libexec/git-core/mergetools/meld: line 1: 2396 Segmentation fault: 11 "$merge_tool_path" "$LOCAL" "$REMOTE"
EDIT I only get the segfault if I click the red X to close Meld. If I quit Python (what shows in the dock when Meld is open) via cmd+Q it closes cleanly.
The version of Meld I'm using is very recent, so I'm surprised I can't find more about this issue. My version of Python is 2.7.10.
Anyone else having this problem? I fear that when I want to actually do a merge and save I won't be able to due to the crash.
This product bug was fixed by now and version 3.14.2 succesfully installs on OS X 10.11 using brew install homebrew/gui/meld
In the future please use product issue tracker for product specific bugs. StackOverflow is not a replacement for usage of an issue tracker.
Check meld issue tracker

Cannot get python IDLE 2.7, 3.3 to run - OS X

I am running a MacBook Pro with 8gb of memory and a 2.5GHz processor. I run OS X Mavericks, but this problem has happened on other operating systems as well. when I try to open the editor, or even open a python file, this happens:
This has been a problem since I got into python. I have tried as many versions as I can, and the same screen pops up. Please help
I recently also upgraded a friends iMac to OS X 10.9 Mavericks and her Python to 2.7.6. If you mount the python-2.7.6-macosx10.6.dmg disk image there's a text file named ReadMe.txt. If you ahem, actually read it, right near the beginning it says:
**** IMPORTANT ****
Update your version of Tcl/Tk to use IDLE or other Tk applications
To use IDLE or other programs that use the Tkinter graphical user
interface toolkit, you may need to install a newer third-party version
of the Tcl/Tk frameworks. Visit
http://www.python.org/download/mac/tcltk/ for current information
about supported and recommended versions of Tcl/Tk for this version of
Python and of Mac OS X.
Here's what http://www.python.org/download/mac/tcltk currently looks like (my highlighting):
To summarize: You need to download and install ActiveTcl 8.5.15.1 (which is mislabeled ActiveTcl 8.5.15.0) from ActiveState's webpage. After doing that you should be able to run IDLE:
I haven't actually tried to do it yet, but from what I read it sounds like the same process applies to Python 3.3.3 and its IDLE app.
I was having the exact same problem.
I was finally able to install Python (and IDLE) via MacPorts by also installing a package called "pyXX-tkinter" -- where XX is the version, e.g. py34-tkinter for Python 3.4.

installing IPython with two versions of Python (Windows)

Is it possible to have IPython (0.12) installed on the same
system with two different versions of Python (v 2.7 and 3.2)? Currently I have both versions of Python running happily on my system.
I am using two machines, one with Windows 7 64-bit, the other XP SP2 32-bit, and both have Python 2.7.2 and 3.2 installed. I have been using IPython with Python 2.7 w/o any problems for a while on both.
Now I would like to have 3.2 available too with IPython, but when I try to run the binary windows IPython installer I get this error toward the end of the install:
*** run_installscript: internal error 0xFFFFFFFF ***
and no shortcuts/entries into Start Menu etc are created.
(I ran the install as adminstrator under Win 7) I am running into the same problem with XP and Win 7.
After poking around the net and SO for a while I saw references for
getting setuptools. Unfortunately, there's no version for Python 3.x
but it was suggested to use distribute.py instead which I ran and
installed. I am not sure how to proceed next. And I'm not even sure it
is possible to do this (though I think it is :)
Any suggestions?
UPDATE: There was a problem with import readline not working with Python 3.2.3, but I was able to fix it by downloading pyreadline-2.0-dev1.win32.exe which works with Python 3.2.3 .. the above problem remains unfortunately.
Ok, here's my solution to get IPython 0.12.1 to work with both Python ver
2.7.x and 3.2.x on the same system (ie. under Windows 7 64 bit and XP SP2 32 bit). It's not
perfect, but works, and hopefully will help others. Where I am showing directories they refer to XP (but should be adjusted accordingly for Windows 7)
Steps for both:
Install both versions of Python via the binary windows installer provided at
Python.org
Install this version of pyreadline pyreadline-2.0-dev1.win32.exe which works
for both versions of Python (I could not get the widely available version 1.7 to work with Python 3.2.x)
I am not sure if distribute.py is necessary, I'd skip it on the
first try.
Download ipython-0.12.1.zip file and extract it. Place it under your Programs directory and cd into it (I'll call this the ipython_dir) [I tried the binary installer numerous times without success]
For Python 3.2 (easier)
In the ipython_dir:
c:\python32\pyton.exe setup.py install
will create ipython3.exe in c:\python32\Scripts that can be used to
fire up iPython
For Python 2.7 (a bit odd)
The above method failed. However, it is possible to start IPython from the ipython_dir with
c:\python27\python.exe ipython.py
I can't explain why this is so, but since I use Console2 I can hide
these two ways of starting IPython.
Summary:
To start IPython with v 2.7.x of Python:
c:\python27\python.exe "C:\Program Files..\ipython_dir\ipython.py"
To start IPython with v 3.2.x of Python:
c:\python32\Scripts\python3.exe
That was a lot of work and took most of the day, so I hope posting the steps above
will save someone else a lot of time (and help me remember what I have to do next time I struggle with this)
Thanks everyone for their suggestions.
Addendum: None of the above resulted in shortcuts or entries in the Start/Program Menus. Shortcuts can be created manually, or in my case aren't necessary since I'm using a special shell (Console2) to run IPython.
The first question in the iPython FAQ titled "Running IPython against multiple versions of Python" may help.

Python 3.0 - Idle wont open. It just bounces in the dock

Python/Unix noob. On Mac OSX.
Been running Python 2.7.2 for a few weeks, along with Idle app. No problems.
Today I just installed Python3.0 along side 2.7 - tested both and can still be ran via Terminal.
Now when I open Idle for 2.7, it opens just fine. But when I open the new Idle app within the Python3.0 folder, the app just bounces in the doc and never opens.
The error from Console is as follows:
12/2/11 11:57:13.612 PM com.apple.launchd.peruser.501:
([0x0-0x38038].org.python.IDLE[313])
posix_spawn("/Applications/Python-3.0/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE", ...):
No such file or directory
How do I get Idle to open for Python3.0?
Do not use Python 3.0. The initial releases of Python 3 were somewhat experimental and had a number of serious problems that have been fixed in subsequent releases. The fixed problems include the one you're seeing which I believe was covered by Issue5196. The current release of Python 3 is 3.2.2 and is considered production-ready. You can find installers for Mac OS X here. There are two installers depending on which version of OS X you are running. If on OS X 10.6 (Snow Leopard) or 10.7 (Lion), pay particular attention to the cautions here about also installing the current version of ActiveState Tcl/Tk to be used instead of the buggy Tcl/Tk 8.5 shipped by Apple in those systems.

Categories

Resources