Sunday 20 November 2011

Installing Sage

My girlfriend and I have recently bought a new computer which has resulted in our old mac moving up to my home office.

A student of mine has supposedly had a few problems installing sage on his mac so this blog post is going to be a full and detailed description of me attempting to install it myself from scratch including all the mistakes I make along the way.

For those of you who are unfamiliar with sage it is an open source math package built on python. I've discovered it over the past 6 months or so and can't speak highly enough of it. It's a brilliant open-source alternative to Maple, Mathematica, Matlab etc...

For info I have a modest understanding of computing. I run ubuntu on my box at work (and have installed sage without a problem there) but in no way consider myself a computer expert... So hopefully this post will be an "idiot's walkthrough" of the installation process (or failure there of).

10:13 am

Here's a screen shot of my computer's system:


10:15 am

First things first I navigate to www.sagemath.org:


Then I head to the download mirror (I chose the UK server):

and choose intel (as my mac is old but not very old):

10:21 am

Now for my first choice. This is perhaps where I show my ignorance a bit. Based on my comfort with the command line I don't think I need to download the *app.dmg package but as I'm hoping to send my student towards this blog post I'll try it anyway. The problem I do have though is that I'm not sure which package to download.  I found this page to help me figure out what bit system I'm running (32 or 64):


Following the instructions gives this result:

Based on the instructions (the last part of the output reads "i386" as opposed to "x86_64") I'm running a 32 bit system (as I thought given that this is an old mac). There are still a few choices that remain however, including what version of the OS I should be pointing at:


Focusing on the 32 bit installs there's still some confusion over the 10.x. I supposedly have a 10.6.8 version of Mac OS X but the only 10.6 install is a 64 bit. I'm deciding to try the 10.5 32 bit install:


10:31 am 

Here goes the download! :)


In the mean time I'm going to run my dmg for inkscape (another great piece of open source software).


10:46 am 

The download is complete (I expect it took longer than usual as we're running a huge back up of our new computer so that's taking up a bit of the router's effort...).


I'm now double clicking on the dmg file:


(I'm realising that I've perhaps chosen the wrong install package as this is sage 4.7 and not the newer release 4.7.2 but let's see what happens)

10:53 am 

This just popped up:


I'm clicking on the README file to see what's next. It seams pretty straightforward:


[Update: my first mistake this is actually the readme file for the .dmg install if you're using the *.app.dmg install then you should scroll down the readme file where there are instructions for that. This is all clear in the readme, I just didn't read the whole thing. Note that the install still works if you follow what I did as the instructions from the readme are basically the same.]

10:55 am 

I'm dragging the sage icon in to the applications folder now:

11:00 am

(sorry for the irrelevant picture but I'm bored)
11:01 am

The copy is done and so now according to the above instructions I'm double clicking on the sage icon. This (which is standard) pops up:


I click on "Open".

11:05 am:

After a bit of a wait (this is an old box), all sorts of things happen:

  • Firstly a neat little sage icon popped up:



  • Then the sage icon turned up in my dock:
  •  Finally a browser window appeared: 
The above is basically telling me to wait, which I do and then a terminal window opens with the first run of sage:

This is now pretty familiar as it's exactly what happens everytime I've installed sage on a linux box. I type in a password and press enter (this password setup only happens the first time):

After retyping my password I press enter and then the next bit of code is basically sage starting a GUI ("notebook") session which looks like this:


It's all working :) :


Bizarrely it seems that I have to launch a notebook GUI no matter what I do and then open up a terminal session but perhaps this is due to me picking the *app.dmg package (I seem to have missed step 3 of the readme file). Note that this comment is irrelevant if all you're interested in is using the GUI. I'm now going to uninstall this and see what installing one of the *.dmg packages does (I won't document that process...).

This all seemed very straightforward to me so I'm not too sure what my student's problem was but hopefully this little write up will help him (and perhaps others). 













No comments:

Post a Comment