It is important that each student has a laptop or other computer to
use during the course. Though it is possible to use a Windows machine,
a Unix-based architecture (such as Mac OSX or Linux) will make your
life much easier, both for this course and in the long run.
There are two primary software requirements for this course:
Python and Git, which is a very useful version control
system. Details on installation can be found below.
Another possibility is to do all work online, using a
Wakari account. This will allow you
to work with Python entirely in your browser, with commands executed
on the cloud, skipping the installation steps outlined below.
Installing Python
The most important piece of software to have is Python. In this
course we will be using Python 2.7.5, though any version
2.6.x-2.7.x should work. Python 3.x has slightly different syntax but should work
with all of the required packages.
Packages
In addition to the Python interpreter, a number of scientific packages
will be required:
-
NumPy version 1.5+:
efficient array operations
-
SciPy version 0.11+:
scientific computing tools
-
matplotlib version 1.0+:
plotting and visualization
-
IPython version 1.0+:
interactive computing
-
Scikit-learn version 0.12+:
machine learning
-
astroML: an astronomical machine learning toolkit
Installation
For installation from-scratch, I highly recommend the
Anaconda Installer, a free product offered by ContinuumIO. It gives you a fast local Python
installation with up-to-date packages.
- Download and install Anaconda on your system, by going to the
above link, downloading the appropriate package. For Mac OSX
you can download the dmg and follow the instructions here
-
Open a new terminal window, and make sure your $PATH
variable points to the Anaconda installation. You can do this by
typing
[~]$ which python
The result should show the path to the newly-installed anaconda
folder. If not, you must modify your $PATH variable to point to
the anaconda directory.
- Update your Anaconda distribution by typing
[~]$ conda update conda
Conda is the package management system that comes with anaconda.
- Update your IPython installation to version 3.0 using
[~]$ conda update ipython
- Check whether your IPython notebook is working correctly: type
[~] ipython notebook
and a browser window should open to the notebook dashboard.
More detailed system-specific help can be found on the Anaconda
installation page.
Even if you have an existing Python installation, I'd still recommend
installing Anaconda for this course. It will make your life a lot
easier.
Installing astroML
the astroML packages and add-ons can be installed using pip
[~]$ pip install astroML
then
[~]$ pip install astroML_addons
the most uptodate code can be downloaded from
Githib and by following these
instructions
Installing Git
Git can be installed rather easily
on OSX or linux. Detailed instructions can be found
here
Linux
If you are on linux, you can use the package management system, via
[~]$ sudo apt-get install git
or
[~]$ yum install git-core
Mac OSX
On Mac OSX, you can either use the Mac installer at
http://code.google.com/p/git-osx-installer
or if you use Macports, type
[~]$ sudo port install git-core