29 Dec 2008

how to install python2.5 on a hacked appletv (in order to use iplayer)

i've hacked my appletv using the ATV PatchStick so that i can use xbmc (xbox media center) and boxee (kinda like last.fm for video). one of the things i wanted to do was to watch bbc iplayer on the appletv that someone wrote. however, it isn't able to run on the appletv because python is not installed.

there is already a guide on how to install python on appletv, but it is quite manual, so i tried my own way which worked just as well:

  1. download the latest python (link) and open up the dmg.

  2. download and install pacifist. this allows you to inspect installer pacakges.

  3. open "Disk Utility", click on "New Image" and create an image of around 100M and name it "PythonInstall":


  4. use pacifist to open up the MacPython.mpkg in the dmg above.

  5. right click on the "Contents of MacPython.mpkg" and choose "Install to Other Disk" and then choose the disk image you just created:


  6. unmount the "PythonInstall" partition.

  7. now copy this image to your appletv via scp. the command will probably be:

    scp ~/Downloads/PythonInstall.dmg frontrow@appletv.local:

  8. then ssh into the appletv box:
    $ ssh frontrow@appletv.local
    Welcome to the AppleTV (via atv-usbcreator)
    frontrow@appletv.local's password:

  9. then mount the image:

    sudo hdiutil mount PythonInstall.dmg  

  10. then copy the contents of the image on to your AppleTV:

    tar cvf - -C/Volumes/PythonInstall/* | tar xvf - -C/

  11. then to test, type "python" and you should get:

    Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
    [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.

once that is done, you can follow the instructions for installing bbc iplayer plugin for boxee/xbmc and get all the awesomeness of iplayer on your appletv.

You can reply to me about this on Twitter: