C4DM2013 Software » History » Version 11

Luis Figueira, 2013-03-11 04:22 PM

1 1 Luis Figueira
h1. C4DM2013 Software
2 1 Luis Figueira
3 1 Luis Figueira
You should ensure the following software is installed on your laptop before you arrive at the bootcamp, so that we can get started promptly with the tutorials.
4 1 Luis Figueira
5 1 Luis Figueira
h2. Shortlist
6 1 Luis Figueira
7 1 Luis Figueira
* Bash (the particular Unix shell we’ll be using)
8 11 Luis Figueira
* Python 2.6+ (the scripting language used in the course)
9 11 Luis Figueira
* "Mercurial":http://mercurial.selenic.com/ and "EasyMercurial":http://easyhg.org (for version control)
10 11 Luis Figueira
* "Firefox":http://www.mozilla.org/en-US/firefox/new/ with "SQLite Manager add-on":https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/ (relational database)
11 1 Luis Figueira
* A text editor (for programming!)
12 2 Luis Figueira
* You can also save time on the day by creating an account beforehand at the "SoundSoftware code site":http://code.soundsoftware.ac.uk.
13 1 Luis Figueira
14 2 Luis Figueira
For the second day of the bootcamp you'll need the following Python packages: 
15 1 Luis Figueira
16 11 Luis Figueira
* "Numpy":http://www.numpy.org/
17 11 Luis Figueira
* "SciPy":http://www.scipy.org/
18 11 Luis Figueira
* "Matplotlib":http://matplotlib.org/
19 11 Luis Figueira
* "Scikits Audiolab":https://pypi.python.org/pypi/scikits.audiolab/
20 2 Luis Figueira
21 6 Luis Figueira
If you run into any trouble, please send us an email: info@soundsoftware.ac.uk.
22 1 Luis Figueira
23 3 Luis Figueira
h2. Installation on Linux
24 1 Luis Figueira
25 9 Luis Figueira
* Bash, Python and Firefox are all available using the appropriate package management tool in all major Linux distributions. Please check that the Python version is 2.x, (2.6 or higher, preferrably). If not, you may need to install a newer version “by hand” or upgrade your Linux installation.
26 10 Luis Figueira
* The "SQLite Manager add-on":https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/ can be installed through the “Add-ons Manager” in Firefox.
27 9 Luis Figueira
* EasyMercurial can be downloaded as a .deb package (for Debian or Ubuntu installations) from the "EasyMercurial page":http://easyhg.org. Your package manager should automatically install any dependencies, including Mercurial itself. On Red Hat or other Linux distributions you will probably need to install Mercurial first using your package manager, then download the EasyMercurial source code package and compile and install it using the instructions in the included file README.txt: just run qmake and then make. The qmake tool is part of the qt-devel package, which you may need to install first.
28 9 Luis Figueira
* If you use Linux, you probably already have a favourite text editor. Emacs and Nano are popular choices, but there are many others.
29 1 Luis Figueira
30 3 Luis Figueira
h2. Installation on Windows
31 1 Luis Figueira
32 4 Luis Figueira
* You should install MinGW and MSYS. Check that you can run (from the Windows Start menu) MinGW -> MinGW Shell in order to open a Bash prompt.
33 4 Luis Figueira
* Install Python 2.7 using the MSI installer from python.org, then both NumPy and SciPy packages from scipy.org.
34 4 Luis Figueira
* Install the scikits.audiolab package from this site, and matplotlib from SourceForge.
35 4 Luis Figueira
* You can download Firefox from the Mozilla web site, and then the SQLite Manager add-on can be installed through the “Add-ons Manager” in Firefox.
36 4 Luis Figueira
* EasyMercurial can be downloaded from the EasyMercurial download page and the Windows installer will also install Mercurial itself.
37 4 Luis Figueira
* You will need to edit the PATH environment variable to add Python and Mercurial. To do this, go to Control Panel -> System and Security -> System -> Advanced system settings -> Advanced and click the Environment Variables button; then edit the PATH user variable and copy and paste
38 4 Luis Figueira
<pre>
39 1 Luis Figueira
C:\Python27;C:\Program Files\EasyMercurial;C:\Program Files (x86)\EasyMercurial
40 4 Luis Figueira
</pre>
41 1 Luis Figueira
onto the end of it.
42 1 Luis Figueira
43 1 Luis Figueira
You can use Wordpad or Notepad as a text editor, or install another editor such as Sublime Text.
44 1 Luis Figueira
45 5 Luis Figueira
h3. Installation on Mac OSX
46 1 Luis Figueira
47 5 Luis Figueira
* OSX comes with Bash and Python.
48 5 Luis Figueira
* You can download Firefox from the Mozilla web site, and then the SQLite Manager add-on can be installed through the “Add-ons Manager” in Firefox.
49 5 Luis Figueira
* You can download Mercurial from the Mercurial web site and EasyMercurial from the EasyMercurial download page.
50 5 Luis Figueira
* There are many text editors available for OSX.
51 1 Luis Figueira
52 5 Luis Figueira
h4. Python under OSX
53 1 Luis Figueira
54 5 Luis Figueira
The following instructions have been tested under OSX Lion (10.7). Please let us know if you run into any problem. 
55 1 Luis Figueira
56 5 Luis Figueira
You’ll need to have both XCode and Homebrew installed.
57 1 Luis Figueira
58 1 Luis Figueira
XCode: Please follow the instructions on this page to install XCode using the AppStore;
59 1 Luis Figueira
Homebrew: Please follow the instructions in the Homebrew’s page.
60 1 Luis Figueira
The easiest way to install SciPy, Numpy and Matplotlib is to use the following script (just follow the instructions on the page): ScipySuperpack
61 1 Luis Figueira
62 1 Luis Figueira
Audiolab depends on libsndfile, so you need to install it first. To install it run the following command on the Terminal:
63 1 Luis Figueira
64 1 Luis Figueira
brew install libsndfile
65 1 Luis Figueira
66 1 Luis Figueira
After this, you need to install Audiolab. To install Audiolab, you need to run the following commands on the Terminal (you might need to be sudo):
67 1 Luis Figueira
68 1 Luis Figueira
easy_install pip
69 1 Luis Figueira
pip install scikits.audiolab
70 1 Luis Figueira
71 1 Luis Figueira
Alternate approach: using a Virtual Machine
72 1 Luis Figueira
If you would prefer, you can install a VirtualBox image of a virtual
73 1 Luis Figueira
machine running Linux with the necessary software already installed.
74 1 Luis Figueira
75 1 Luis Figueira
You can download the VirtualBox disk image file from the following
76 1 Luis Figueira
link: SoundSoftware_SoftwareCarpentry-20120910.zip (1.2GB) (SHA-1: fff6c4804e61e9fc2aef41f8f5e412eec44909cd). After
77 1 Luis Figueira
downloading, unzip the file to obtain a .vdi disk image.
78 1 Luis Figueira
79 1 Luis Figueira
To use it, you will need to install VirtualBox from
80 1 Luis Figueira
http://virtualbox.org. Install VirtualBox, then create a new virtual
81 1 Luis Figueira
machine using the default settings (with however much memory you think
82 1 Luis Figueira
you can allocate to it) using the .vdi file as its disk image.
83 1 Luis Figueira
84 1 Luis Figueira
When you run the virtual machine, you will need to log in as a user:
85 1 Luis Figueira
the default user is called “ssw” and has password “ssw2012″.
86 1 Luis Figueira
87 4 Luis Figueira
h2. Testing the installed software
88 4 Luis Figueira
89 1 Luis Figueira
We recommend that you try the following simple tests to ensure that everything is installed and working correctly before the course starts.
90 1 Luis Figueira
91 4 Luis Figueira
h3. Bash
92 1 Luis Figueira
93 1 Luis Figueira
At the prompt, type “whoami”. You should be told what your user name is on the computer you are using.
94 1 Luis Figueira
95 4 Luis Figueira
h3. Python
96 1 Luis Figueira
97 1 Luis Figueira
At the prompt, type “print 2+2″ and check that you agree with the result.
98 1 Luis Figueira
99 1 Luis Figueira
Then type “import sqlite3″ and verify that you don’t see an error message.
100 1 Luis Figueira
101 4 Luis Figueira
h3. SQLite Manager
102 1 Luis Figueira
103 1 Luis Figueira
Open SQLite Manager from Firefox. In Firefox 10 on Linux this is under the “Tools” menu, but this may vary depending on the version and operating system you are using.
104 1 Luis Figueira
105 1 Luis Figueira
Create a new database: Database -> New Database.
106 1 Luis Figueira
107 4 Luis Figueira
h3. Mercurial
108 1 Luis Figueira
109 1 Luis Figueira
At the Bash prompt, type “hg”. You should see a list of basic Mercurial commands.
110 1 Luis Figueira
111 4 Luis Figueira
h3. EasyMercurial
112 1 Luis Figueira
113 1 Luis Figueira
Create a directory (folder) somewhere on your computer.
114 1 Luis Figueira
115 1 Luis Figueira
Start EasyMercurial and create a repository in your new directory: Open -> File folder -> navigate to your directory  and click “OK”.
116 1 Luis Figueira
117 4 Luis Figueira
h3. Text editor
118 1 Luis Figueira
119 1 Luis Figueira
Create and save a file with some plain text in it.