Installation for Mac OS X 10.4 Tiger (Power PC and Intel)
Since we don't have access to a Mac OS X 10.4 Tiger machine, we will reuse the configuration from AusVOSS 2007, except the packages will be slightly updated.
If you attended AusVOSS 2007 and installed all of the packages successfully, then there is no need to redo the installation, since the minor version changes are not significant for the course.
1. Python
The version of Python we are using is 2.4 which is not the most recent release.
The reason for using an older version is that many of the packages we are using are not available yet as pre-compiled packages for Python 2.5 on all of the operating systems we are supporting.
The general Python 2.4 installation instructions are available here.
Mac OS X already comes with a version of Python installed. If you have Mac OS X 10.3 (Panther) then you will already have Python 2.3.0. If you have Mac OS X 10.4 (Tiger) then you will already have Python 2.3.5. If you have also installed extra Unix packages using Fink or DarwinPorts then you might have other versions on your system (e.g. in /sw/bin or /usr/local/bin).
Unfortunately, the situation is all a bit messy because the binary distribution of the modules we need all must be compiled for one version only. The best thing is therefore to install the latest version from scratch and then go from there.
If you have Mac OS X 10.3.9 or late, the version we recommend installing is available from the Unofficial MacPython wiki because it will be compatible with the modules you need. You can download the necessary binary installer for Python 2.4.4 (including some of the modules listed below) from the Universal Python 2.4 download page. This version will work for both Power PC (older) and Intel (newer) Macs.
In particular you need the disk image at the top of the page which contains the MacPython package. Double clicking on the disk image will mount it, showing you the contents, then you just need to double click on the MacPython.mpkg file and follow the instructions.
Note: for all of these installations you will need the password to your user account to install the packages.
Older versions of Mac OS X will be trickier to install and it may be easier for us to help you with that on the first day of the workshop.
2. Python Modules
Some Python modules have Windows installers (downloads that end with .exe) whilst others require manual installation.
To check Python has been installed correctly, and you are using version 2.4.4, you should open a Terminal window and type:
~$ python Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
and you should see that you are using Python 2.4.4 and not an older version.
2.1 NumPy (Numerical Python library)
We are using NumPy 1.0.1 which is available from the SciPy download page. Unfortunately, there is only the source code for Mac OS X/Linux, which is rather painful compile and install.
A better option is use the pre-built binary packages available from the MacPython site again. Again, the installer is distributed as a disk image which you need to download, mount and then run the package file inside.
Once NumPy is installed you should be able to go:
>>> import numpy
in the interactive Python interpreter and it should not return an error message.
2.2 SciPy (Scientific Python library)
We will be using SciPy 0.5.1 which is available from the SciPy download page. The same situation applies here to NumPy above -- it is painful to build and install SciPy from the source code.
Again we will be using the pre-built binary packages available from the MacPython site. The installer is distributed as a zipped package file which you need to download, unzip and then run the package file inside. On the Mac you can unzip the file by double clicking on it and then you just need to run the package file as before.
Note: this pre-compiled version is slightly older than the version we are using in Windows and Mac OS X 10.5 (0.6), however, this is not significant for the course.
Once SciPy is installed you should be able to go:
>>> import scipy
in the interactive Python interpreter and it should not return an error message.
2.3 wxPython (GUI library)
The Python installer for Mac OS X does not automatically come with Tkinter, the standard Tk GUI library. We need to install Tk or another GUI package for the plotting to the screen in matplotlib to work.
wxPython is a Python wrapper around the wxWidgets library. It produces nicer looking GUIs than Tkinter, native under most operating systems, and also works with matplotlib.
We will use the pre-built binary packages available from the MacPython site again. Again, the installer is distributed as a disk image which you need to download, mount and then run the package file inside. Make sure you get the 2.8.0.1 version (at the bottom of the page) rather than the 2.6.3.3 version.
2.4 matplotlib (Matlab like plotting library)
We will be using matplotlib 0.87.7 which is available from the matplotlib download page.
A similar story to NumPy and SciPy applies here for installing matplotlib. There are binaries available from the matplotlib site in the form of Python Eggs (like Java jar files). Unfortunately those binaries are incompatible with the NumPy and SciPy installed above and it crashed in the demonstrations we have tested.
Once more, the pre-built binary packages available from the MacPython site are the way to go. Ihe installer is distributed as a disk image which you need to download, mount and then run the package file inside.
Once matplotlib is installed you should be able to go:
>>> import matplotlib
in the interactive Python interpreter and it should not return an error message.
At the same time you might like to look at the examples on the matplotlib homepage.
2.5 SOAPpy and fpconst (Web services library)
SOAPpy and fpconst are libraries that require manual installation. SOAPpy needs fpconst to handle special floating point values such as infinity and NaN (not a number). We will use fpconst version 0.7.3 which is available from the RSoap download page. You need the fpconst zip file.
Once you have downloaded the zip file, unpack it into a directory. You need to change into the directory where you unzipped fpconst:
~> cd fpconst-0.7.3
You then need to run the Python interpreter on a file called setup.py with the argument install. The sudo command at the beginning gives python permission to the files outside of your individual file space -- it will ask you for your password before running the rest of the command.
~> sudo python setup.py install passwd: running install running build ... copying build/lib/fpconst.py -> /Library/.../2.4/lib/python2.4/site-packages byte-compiling /Library/.../2.4/lib/python2.4/site-packages/fpconst.py to fpconst.pyc
A similar manual installation process is required for SOAPpy. We are using SOAPpy 0.12_rc1 which is available from the Web Services for Python download page. You need the SOAPpy 0.12_rc zip file.
You then repeat the installation process used for fpconst: unzip the file and run sudo python setup.py install inside the unpacked directory.
Once SOAPpy and fpconst are installed you should be able to go:
>>> import fpconst >>> import SOAPpy
in the interactive Python interpreter and it should not return an error message.
2.6 MySQLdb (MySQL client library)
We are using the MySQL database in the course. To access the database server from within Python you need the MySQLdb module installed.
For the final time, the pre-built binary packages available from the MacPython site save us the trouble of compiling. Ihe installer is distributed as a disk image which you need to download and unzip. This creates a directory with the package inside which can be installed like all of the other packages.
2.6 IPython (improved interactive interpreter)
IPython is an improved Python interactive interpreter. For the Unix/Mac OS X installation you need to download the gzipped tar file of source for this module from here and then install it manually (like fpconst and SOAPpy).
The following instructions will build and install IPython from the tar file:
~> tar -xvzf ipython-0.7.3.tar.gz drwxr-xr-x fperez/wavelet 0 2006-06-07 14:45 ipython-0.7.2/... -rw-r--r-- fperez/wavelet 1631 2006-03-07 17:01 ipython-0.7.2/README... ... ~> cd ipython-0.7.3 ~> sudo python setup.py install passwd: ...
Once the build and installation process has been completed you should be able to run ipython from a Terminal window:
~> ipython Python 2.4.4 (#1, Oct 18 2006, 10:34:39) Type "copyright", "credits" or "license" for more information. IPython 0.7.2 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]:
Summary of the Python module files to install
If you download and run these you will have everything above:
SOAPpy, fpconst and IPython are a bit trickier, these are the files, but you need to follow the instructions above:
3. MySQL (MySQL database server)
As well as installing the MySQLdb client library for Python (above) you also need to install the MySQL server itself. We will be using the Open Source community server version 5.0.51a available from here. The Mac OS X package files are a long way down the page, and there are separate binary installers for Mac OS X 10.3 and 10.4 (for older Power PC Macs and newer Intel Macs). You just need the standard installation package.
4. Subversion and Tortoise SVN (version control tools)
We will be using subversion 1.4.6 (the latest) which can either be installed using the Fink package system:
~> fink install svn-client
or using the DarwinPorts package system:
~> cd /opt/local/bin/portslocation/dports/subversion ~> sudo port install subversion
If you are aren't using either of these package management systems then you can download this zipped package, unzip it and run the package to install Subversion 1.4.4.
5. Bash shell/Unix tools
Mac OS X comes with all of the tools we need already!
6. Java runtime environment
If you have been keeping up with the Mac OS X automatic updates you will have a recent enough version of Java to run Aladin without any problems.
7. Aladin (VO-enabled Sky Atlas)
We are using
Aladin version 5 which can be downloaded from the Aladin stand-alone download page. There are a variety of different versions plus a jar file (labelled as piece by piece). We need to use the jar version because we need to set the web proxy before Aladin loads. Please download the three jar files: Aladin.jar.
We will explain how to run it during the summer school.
