Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Installing Python Idle

I'm an aerospace engineer and I just want to use Python to crunch numbers as a cool freebie Matlab alternative. I don't want to learn Java so I do not need or want any of the Mac OS cocoa hooks. I do need numpy and matplotlib.

Xcode 3.0 has no simple Python project type without all the system bridging clutter.

I want to install Idle to get a more Python-focused IDE. The latest MacPython version is 2.5.1, which matches what came with OS X 10.5.1. Unfortunately the MacPython distribution is vintage April 18, 2007, which I think is prior to Leopard's release. Unfortunately the installer won't let go of "Python Framework" and let me just install the "GUI Applications" (Idle). The installer also won't let me know exactly where on my drive it wants to install itself. I'm afraid if I let it run it will clobber whatever custom install Apple did on the factory Python 2.5.1.

Does anybody have a plain vanilla Python project template for Xcode 3.0?

Has anybody tried to install Idle on OS 10.5.1? Is the Python 2.5.1 installer safe? Is there a pure Idle installer somewhere? Can I download Idle as a .app from somewhere?

I also have Komodo Edit. It's Python-aware (syntax highlighting/errors), but its slug slow and its no IDE (no debug/run option).

Black MacBook, Mac OS X (10.5.1), 2.16 GHz Intel Core 2 Duo, 2GB 667 MHz DDR2

Posted on Feb 6, 2008 8:40 AM

Reply
8 replies

Feb 27, 2008 10:07 PM in response to larryy

I've done as you asked, but it's no go. I get a blip on my screen and nothing when I try to launch Idle. Meanwhile in the console:

"([0x0-ox8b08b].org.python.IDLE[8210) posix_spawnp("/Applications/MacPython 2.5/IDLE.app/Contents/MacOS/IDLE", ...): No such file or directory"

Um... something did not install correctly.

Feb 7, 2008 1:31 AM in response to mars rvr

No help from me, just a plea for an answer. I will be teaching a college-level Python class and I need to keep it platform agnostic, which means using IDLE. I've done quite a bit of searching on python.org, MacPython, and the web, and have yet to find any way to install IDLE on Leopard, without using the same MacPython distribution "mars rvr" is worried about using. As mars notes, that installer will not let you deselect its Python.framework, and it also by default installs something it calls (something like) 'fix for system python'. That can't be a good idea when it was clearly designed for Tiger.

I hope someone at Apple who is responsible for getting Python 2.5.1 into Leopard (thank you!) will know how to get IDLE installed safely on Leopard. (And I'd humbly request it be a standard part of the system going forward, added via a Software Update as soon as possible.)

Feb 7, 2008 12:22 PM in response to mars rvr

Got it, with some help from Quinn "The Eskimo!". Do this:

1. Download and mount:

<http://pythonmac.org/packages/py25-fat/dmg/python-2.5-macosx.dmg>

2. In Finder, do a Show Package Contents on "MacPython.mpkg".

3. Navigate to Contents > Packages > PythonApplications-2.5.pkg; double click and install it. This only installs stuff (including IDLE.app) in "/Applications/MacPython 2.5", so it won't interfere with your system install of Python. Also, the installer will let you chose a custom folder to install it into.

4. In Terminal, create a symbolic link for the system's Python.framework in the location expected by the pythonmac.org tools, like so:

cd /Library/Frameworks
sudo ln -s /System/Library/Frameworks/Python.framework/ Python.framework

You're done! IDLE.app works as intended. So does Build Applet.app. And since the pythonmac.org distro is the same 2.5.1 release as comes pre-installed with Leopard, there shouldn't be any module/interpreter compatibility issues.

Always look on the bright side of life, da-da, da-da-da-da-da-da...

Feb 8, 2008 5:13 PM in response to larryy

I discovered that if you have installed Apple's developer tools (Xcode et al), Build Applet.app is already present in /Developer/Applications/Utilities/MacPython 2.5/, so you should probably delete the newly installed one.

Whether developer tools are installed or not you should probably delete the newly installed Python Launcher.app, because it is already present in the system Python.framework.

Mar 25, 2008 6:03 PM in response to mars rvr

I have the same issue with Xcode + python. After a lot of searching I finally settled on using Emacs, not everyones favorite I know, but if you are willing to put in the effort it can do all the things a modern IDE can (debugging with pydb or pdb, code completion, refactoring, tips, snippets, the speedbar for class browsing etc), albeit in text. There is a cocoa implementation of GNU Emacs also (no messing about with aquamacs or XEmacs). The reason why I finally chose this over Komodo (it pretty usable on my machine on windows?) was because Emacs is supported everywhere, its practically eternal 🙂

One other thing you might be interested in is Textmate, I know quite a few people that swear by it. I have a license myself in fact for typesetting LaTeX.

Apr 12, 2008 12:17 PM in response to mars rvr

IDLE is part of the default 10.5 Python 2.5.1 install. You just have to know how to launch it. As directed here:

http://www.givegoodweb.com/post/39/idle-on-leopard

Either from inside the interpreter:
import idlelib.idle

Or, from the terminal:
python -m idlelib.idle

Just add an alias to your .profile file to it and you are good to go. Hope this helps.

Apr 12, 2008 8:03 PM in response to mars rvr

Did you do the final step, creating that symbolic link?

cd /Library/Frameworks
sudo ln -s /System/Library/Frameworks/Python.framework/ Python.framework

That's essential, because the MacPython version of IDLE.app you just installed was built with the Python.framework in a different location than it lives by default in Leopard.

The steps I outlined worked for me and I'm routinely using the IDLE.app this way, so I'm not sure what else could be different about our installations.

Installing Python Idle

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.