Installation for Windows 95, 98, ME, 2000, and XP (and maybe Vista)

Most of this installation should work for Vista, but we don't have a Vista machine available at the moment to check this instructions. If you have a problem on Vista, please let us know.

1. Python

The version of Python we are using is 2.5 which is the most recent stable release. Note you do not want the 2.6 or 3.0 alpha releases which are also listed on the releases page.

The general Python 2.5 installation instructions are available here.

To install Python, you can download the Microsoft Installer package (.msi) for Python 2.5.4 directly and run it. If you accept all of the default options (i.e. install Python in C:\Python25) then the rest of our instructions will be easiest to follow.

If you are running older versions of Windows and the Installer doesn't run, you may need to first install the Microsoft Installer software available for Windows 95, 98 and ME and Windows NT and 2000 (the download is at the bottom of the page).

Once Python has been installed correctly you should have a Python 2.5 menu under the Start -> All Programs menu.

2. Python Modules

Some Python modules have Windows installers (downloads that end with .exe) whilst others require manual installation.

Note that open source sites like SourceForge may use popup windows for the software you need to download and this may be blocked by your browser. Usually if this happens a warning bar will appear notifying you and you can click on that to continue downloading the file.

2.1 NumPy (Numerical Python library)

We are using NumPy 1.0.4 which is available from the SciPy download page. You must install the Windows binary installation version for Python 2.5.

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.6 which is available from the SciPy download page. You must install the Windows binary installation version for Python 2.5.

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 matplotlib (Matlab like plotting library)

We will be using matplotlib 0.91.2 which is available from the matplotlib download page. You must install the Windows binary installation version for Python 2.5.

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 grab a copy of the matplotlib example files which can be downloaded as a single zip file.

Once you have unzipped the examples they can be run from Windows Explorer. For example, if you double click on the histogram_demo.py file, a window should pop up containing an example histogram.

2.4 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 (on the desktop is fine for example). You then need to open a command prompt window (by going Start -> Run... and typing cmd into the text box, and clicking ok).

You should have a new text window open up, looking like this:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\james>

This is for Windows 2000, but it will look similar for older and newer versions of Windows. You need to change into the directory where you unzipped fpconst:

C:\Documents and Settings\james>cd Desktop

C:\Documents and Settings\james\Desktop>cd fpconst-0.7.3

You then need to run the Python interpreter on a file called setup.py with the argument install:

C:\Documents and Settings\james\Desktop\fpconst-0.7.3>setup.py install
running install
running build
running build_py
...
byte-compiling C:\Python25\Lib\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.

Unfortunately, SOAPpy hasn't been updated for a couple of years and Python 2.5 now catches some errors which were previously ignored, so you will need to download and install our updated version.

You then repeat the installation process used for fpconst: unzip the file and run setup.py install.

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.5 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. We will be using MySQLdb 1.2.2 and again you need to download and run the Windows binary installer for Python 2.5

2.6 IPython and PyReadline

IPython is an improved Python interactive interpreter. It requires the PyReadline module which provides improved command line support.

You need to install PyReadline version 1.5 which is available from the PyReadline website (under binary install). PyReadline is pure Python so it is not version specific (i.e. it works on Python 2.4 and Python 2.5).

Once PyReadline is installed, you need to install IPython which will add a new IPython menu under Start -> Programs. Unfortunately, the IPython downloads page doesn't make it clear where you get the Windows installer from, but you can get it from this link.

Summary of the Python module files to install

If you download and run these you will have everything above:

SOAPpy and fpconst 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. For this lab we only need the essentials Windows Installer package.

Note: there is a newer release candidate (5.1) and alpha (6.0) versions but it is best to go with the stable release.

3.1 Configuration of MySQL

Once the MySQL installation has completed, the setup program will ask you if you want to configure MySQL. You should say yes (although it can also be done later).

Select the Detailed Configuration option on the first page of the configuration wizard, so that we can make some slight adjustments to the setup:

  • Developer Machine (leave as default)
  • Multifunctional Database (leave as default)
  • Installation Path (leave as default)
  • Decision Support (leave as default)
  • Enable TCP/IP networking (leave as default)
  • Best Support for Multilingualism (tick this checkbox!)
  • Install as Windows Service (leave as default)/Include Bin Directory (tick this checkbox!)
  • Modify Security Settings (untick this box). That way there will be no root password on the database -- which is easier for just mucking around on your laptop. Don't do this if you are setting up a server!!

4. Subversion and Tortoise SVN (version control tools)

In Linux/Mac OS X we will be using the subversion command line tools, but under Windows there is also Tortoise SVN which integrates with Windows Explorer to make version control even easier.

We will be using version 1.4.6 (the latest stable release) which has a Windows Installer binary. Warning: this installer changes Windows Explorer so will probably want to reboot the machine once the installation is complete.

5. Bash shell/Unix tools

The easiest way of getting access to the Bash shell and other Unix tools is to install Cygwin which is a Unix emulation environment for Windows. You have access to all of your files etc from within what appears to be a Unix terminal window.

The basic Cygwin installation only provides the emulation environment and a small number of tools. To install you need to download and run the setup program. From this program you can choose which packages to install. Extra packages can be installed or updated at a later date using the same setup program.

The packages you need installed are:

  • bash
  • coreutils
  • findutils
  • gawk
  • grep
  • gzip
  • less
  • make
  • sed
  • subversion
  • tar
  • wget

If any other packages are marked to be installed by default leave them as is.

6. Java runtime environment

To run packages like Aladin you need to have a recent version of the Java runtime environment (JRE) installed on your machine. You can download the most recent version from the Sun Microsystems Java for Windows download page. In particular, you need to download the Java RE 6 package. We only actually need Java RE 5 but you might as well have the latest release. You need to accept the licence agreement and then download and install the Windows multi-language installer (either offline or online).

7. Aladin (VO-enabled Sky Atlas)

We are using Aladin version 5 which can be downloaded from the Aladin stand-alone download page. There is a Windows executable download and a set of jar files (labelled as for java experts). 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, voplot.jar and vospec.jar.

We will explain how to run them during the summer school.