This page includes all of our setup instructions, organized by platform. We do not recommend that you present instructions to students this way. Instead, please pick and choose the bits of setup that are most appropriate to their needs.
Bash is a commonly-used shell. Using a shell gives you more power to do more tasks more quickly with your computer.
When you're writing code, it's nice to have a text editor that is optimized for writing code, with features like automatic color-coding of key words.
Git is a state-of-the-art version control system. It lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com.
Python is becoming more and more popular in scientific computing, and it's a great language for teaching general programming concepts due to its easy-to-read syntax. We will be using Python version 2.7. Installing all the scientific packages for Python individually can be a bit difficult, so we recommend using an all-in-one installer.
Install Git Bash following these instructions. This gives you Git as well as Bash.
For Cygwin under Windows, start the Cygwin Terminal by clicking on its desk-top icon:
Or browse using Windows Explorer to C:\cygwin\bin\
and double-click on mintty.exe
.
You should see a terminal window like:
Your home directory—the one the Cygwin Terminal defaults to—can
be found at C:\cygwin\home\your-user-name\
.
Notepad++ is a popular free code editor for Windows.
Install Git Bash following the instructions here. This gives you Bash as well as Git. NOTE: To copy/paste into/out of this window, right click on the top bar of the window, go to the properties menu, and click on ‘QuickEditMode’. Once you have selected that, highlight text and then hit enter to copy, right-click to paste.
For Windows we recommend the Enthought Canopy distribution since it seems to work well with Git Bash.
For other options check the Python4Astronomers page on installing scientific Python.
sqlite-shell-win32-x86-SOMENUMBERS.zip
from the SQLite download page.
sqlite.exe
into C:\Windows
.
These instructions were tested using Mac OS X 10.7.4, which comes with:
All installation needs to be done as a root user or user with certain administrator privileges.
The default shell in all versions of Mac OS X is bash,
so no need to install anything. You access bash from
the Terminal (found
in /Applications/Utilities
). You may want
to keep Terminal in your dock for this workshop.
We recommend Text Wrangler or Sublime Text.
Installing Git may require you to first install XCode. This is a very large download (several gigabytes), so please do it before arriving at the bootcamp.
Go to the Xcode website. Get XCode from the App Store making certain to install the command line tools (from the Download preferences pane). Git is included in the command line tools.
If you have Mac OS X 10.6,
first get XCode by going to
the Apple developer site.
You have to sign in with an Apple ID linked to a Developer account.
If you don't have one,
you can register and create one.
Once you log in,
go to page 8 and find "XCode 3.2.6 and iOS SDK 4.3 for Snow Leopard".
Click to open that section,
and then download the .dmg
file.
Finally,
install just git.
If you do not already have access to make
from within your shell,
you will need to install XCode (which is free, but over a gigabyte to download).
Once XCode has installed:
You will now be able to run make
within your Bash shell.
Download and install the Mac binary package. If your bootcamp is also using the EasyMercurial GUI, download the Mac binary package.
Run:
$ easy_install nose
and then run:
$ nosetests
You should see something like:
---------------------------------------------------------------------- Ran 0 tests in 0.003s OK
We recommend the all-in-one scientific Python installer Anaconda. (Installation requires using the shell and if you aren't comfortable doing the installation yourself just download the installer and we'll help you at the boot camp.)
bash Anaconda-and then press tab. The name of the file you just downloaded should appear.
yes
and press enter to approve
the license. Press enter to approve the default
location for the files. Type yes
and
press enter to prepend Anaconda to
your PATH
(this makes the Anaconda
distribution the default Python).
Browse to the Applications folder, then into the Utilities folder and open the Terminal application. You should see a terminal window like:
Your home directory—the one the terminal defaults to—can be found at
/Users/your-user-name
.
The default shell is usually bash
,
but if your machine is set up differently
you can run it by opening a terminal and typing bash
.
There is no need to install anything.
Kate is one option for Linux users.
If Git is not already available on your machine you can try
to install it via your distro's package manager
(e.g. apt-get
).
We recommend the all-in-one scientific Python installer Anaconda. (Installation requires using the shell and if you aren't comfortable doing the installation yourself just download the installer and we'll help you at the boot camp.)
bash Anaconda-and then press tab. The name of the file you just downloaded should appear.
yes
and press enter to approve
the license. Press enter to approve the default
location for the files. Type yes
and
press enter to prepend Anaconda to
your PATH
(this makes the Anaconda
distribution the default Python).
Scientific Linux 6 already comes with:
All installation needs to be done as a root user or user with certain administrator privileges. If you have such access you can do:
$ sudo su -
and then enter your usual password.
The yum
commands used in the instructions
were tested using Scientific Linux release 6.2 (Carbon).
If your bootcamp is using the EasyMercurial GUI,
download the EasyMercurial Debian/Ubuntu source package.
This can be done at the command-line by copying the download link from the download page
(using right-click and Copy Shortcut)
then using wget
,
e.g.:
$ wget https://code.soundsoftware.ac.uk/attachments/download/489/EasyMercurial-1.2.2-src.tar.gz
(This link may have been updated since this page was written, so check the download page above for the URL to use.) Next, unpack the distribution:
$ gunzip EasyMercurial-1.2.2-src.tar.gz $ tar -xf EasyMercurial-1.2.2-src.tar $ cd EasyMercurial-1.2.2-src
Install dependencies:
$ yum install qt4 $ yum install qt4-devel $ yum install PyQt4
and then build
(the EasyMercurial README
says to use qmake
but I used qmake-qt4
):
$ qmake-qt4 $ make
Finally, run:
$ ./EasyMercurial
Run:
$ yum install emacs $ emacs --version
Run:
$ yum install xemacs $ xemacs --version
If you are using the latest version of EasyMercurial then you need at least Mercurial 1.7. Unfortunately the easy-to-use command:
$ yum install mercurial
only installs 1.4,
so we need to build from source.
First,
download the Mercurial source package.
This can be done at the command-line by copying the download link from the download page
(using right-click and Copy Shortcut)
then using a wget
,
e.g.:
$ wget http://mercurial.selenic.com/release/mercurial-2.3.2.tar.gz
(This link may have been updated since this page was written, so check the download page above for the URL to use.) Second, unpack the distribution:
$ gunzip mercurial-2.3.2.tar.gz $ tar -xf mercurial-2.3.2.tar $ cd mercurial-2.3.2
Third, install dependencies:
$ yum install python-devel $ easy_install docutils
Fourth and finally, build and install the software:
$ make install
Run:
$ yum install nano $ nano --version
Run:
$ easy_install nose
And check:
$ nosetests ---------------------------------------------------------------------- Ran 0 tests in 0.003s OK
Run:
$ yum install python
Run:
$ yum install python-setuptools
SQLite does not need administrator privileges to run.
To install,
download the SQLite Precompiled Binaries for Linux package
from the SQLite download page.
This can be done at the command-line by copying the download link from the download page
(using right-click and Copy Shortcut) then using wget
,
e.g.:
$ wget http://www.sqlite.org/sqlite-shell-linux-x86-3071401.zip
(This link may have been updated since this page was written, so check the download page above for the URL to use.) Next, unzip and make sure the binary runs:
$ unzip sqlite-shell-linux-x86-3071100.zip $ ./sqlite3 --version
You can then copy the sqlite3
binary wherever you would like.
This depends on what windowing system you are using whether it be KDE, GNOME or X-windows. For example, for GNOME select the menu Applications→System Tools and select Terminal. You should see a terminal window like:
These commands were tested using Ubuntu 11.04 running within VMWare. Ubuntu 11.04 already comes with:
All installation needs to be done as a root user or user with certain administrator privileges. If you have such access you can do:
$ sudo su -
Then enter your usual password.
If your bootcamp is using the EasyMercurial GUI,
download the EasyMercurial Debian/Ubuntu .deb
package.
This can be done at the command-line by copying the download link from the download page
(using right-click and Copy Shortcut) then using wget
,
e.g.:
$ wget https://code.soundsoftware.ac.uk/attachments/download/487/easymercurial_1.2.2cc-1_i386.deb
(This link may have been updated since this page was written, so check the download page above for the URL to use.) Next, run:
$ dpkg -i easymercurial_1.2cc-1_i386.deb
This will produce a lot of warnings about dependency problems—ignore them. Now run:
$ apt-get -f install $ dpkg -i easymercurial_1.2cc-1_i386.deb
Go to the Applications→Programming menu and you should see an EasyMercurial command. Select it and EasyMercurial should start.
Run:
$ apt-get install emacs23 $ emacs --version
Run:
$ apt-get install xemacs21 $ xemacs --version
Run:
$ apt-get install mercurial $ hg --version
Run:
$ easy_install nose
and check:
$ nosetests ---------------------------------------------------------------------- Ran 0 tests in 0.003s OK
Run:
$ apt-get install python-setuptools
SQLite does not need administrator privileges to run.
To install,
download the SQLite Precompiled Binaries for Linux package
from the SQLite download page.
This can be done at the command-line by copying the download link from the download page
(using right-click and Copy Shortcut) then using wget
,
e.g.:
$ wget http://www.sqlite.org/sqlite-shell-linux-x86-3071401.zip
(This link may have been updated since this page was written, so check the download page above for the URL to use.) Next, unzip and make sure the binary runs:
$ unzip sqlite-shell-linux-x86-3071100.zip $ ./sqlite3 --version
You can then copy the sqlite3
binary wherever you would like.
Select the menu Applications→Accessories and select Terminal. You should see a terminal window like:
Installation issues can and do happen. To ensure that you
can continue to participate in a lesson even if one of your
software programs fails, we provide a Linux virtual machine
that contains all the necessary software
pre-installed. Please install
VirtualBox
and download
this virtual machine image.
Load the VM into VirtualBox by doing Import Appliance and loading the .ova
file.
The SQLite Manager add-on can be installed through the "Add-ons Manager" in Firefox.
sqlite
.