Skip navigation
This discussion is archived

Installing Python Idle

9142 Views 8 Replies Latest reply: Apr 12, 2008 8:03 PM by larryy RSS
mars rvr Calculating status...
Currently Being Moderated
Feb 6, 2008 8:40 AM
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
  • larryy Level 1 Level 1 (5 points)
    Currently Being Moderated
    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.)
    MacBook Pro 17/2.16, Mac OS X (10.5.1), all updates applied
  • larryy Level 1 Level 1 (5 points)
    Currently Being Moderated
    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...
    MacBook Pro 17/2.16, Mac OS X (10.5.1), all updates applied
  • larryy Level 1 Level 1 (5 points)
    Currently Being Moderated
    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.
    MacBook Pro 17/2.16, Mac OS X (10.5.1), all updates applied
  • scottmacd Calculating status...
    Currently Being Moderated
    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.
  • GreyhoundMatt Calculating status...
    Currently Being Moderated
    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.
    MacBook, Mac OS X (10.5.2), 4GB FTW!
  • larryy Level 1 Level 1 (5 points)
    Currently Being Moderated
    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.
    MacBook Pro 17/2.16, Mac OS X (10.4.6), all updates applied

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.