Tuesday, February 24, 2009

Installing Python on Mac OS X (10.3, 10.4 or 10.5) from scratch

Installing Python on a Macintosh running Mac OS X 10.3 "Panther", 10.4 "Tiger" or 10.5 "Leopard" is quite simple and straight forward, the steps are very similar to the ones for
  1. Download the installer from http://pythonmac.org/packages/py25-fat/dmg/python-2.5-macosx.dmg (approximately 18MB)
  2. Mount the disk image.
  3. Backup your .bash_profile before you install.
  4. Double click MacPython.mpkg to start the install process. This would install the Python Frameworks along with the extras including IDLE. They would be installed in the Applications/MacPython 2.5 folder.
Once installed, you may try the installation with the simple "hello world" trial.
  1. Open TextEdit or your favourite text editor, in a blank text only file, type
    print "hello world"
  2. Save the file with the extension .py and close the text editor.
  3. Open this file with IDLE and from the Run menu, select Run Module.
  4. You should see hello world in the Python Shell.
All done, Python is now installed! Have fun!

If you have any questions or problems, just post back!

6 comments:

dustin said...

Thank you for your python mac post! I was able to use the link and install on mac tiger with no problem. Thanks.

Vibhu Mishra said...

Thanks dustin,

Glad you found it useful.

Do keep visiting frequently - I will continue to update the blog.

Cheers!

Pony said...

Hey Vibhu,

I am pretty new to how the computer is constructed. the bash_profile is that the log in users profile?? And if so, how exactly does one back that up?

Thanks,

Emma

Vibhu Mishra said...

Hi Emma,

Thanks for the post,

I am not quite sure what you mean by the question.

If you want to copy the bash_profile, one of the easiest ways to do this is through the Terminal, use the "cp" command.

The syntax is
> cp file1.txt folder/file1_copy.txt

Hope this helps,

Do let me know!

Isaac Skelton said...

Hi thanks for the help glad it worked.
There is one question I want to know though. I wondered if Python was the software used for binary codes. if so could you please explain how I could write such things as binary codes in it. If not do you know any softwares the run them.

Thanks Isaac Skelton.
My website is... http://www.freeadsplusmore.webs.com

Vibhu Mishra said...

Hi Isaac,

Thanks for the post, but I don't understand it quite, do you want to "code" in binary?

Let me know and lets see if I can help you out...