-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold-index.html
464 lines (401 loc) · 16.5 KB
/
old-index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title> Software Basics Workshop </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
<link href="css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/swc.css" />
<!--link rel="stylesheet" type="text/css" href="{{page.root}}/css/swc-bootstrap.css" /-->
<link rel="alternate" type="application/rss+xml" title="The Software Sustainability Institute Blog" href="http://software.ac.uk/blog"/>
</head>
<body class="workshop">
<div class="container card">
<article>
<div class="row">
<div class="span10 offset1">
<h2>Software Prerequisites</h2>
<p><b><em>Important: prior to the workshop, you must ensure you have the following software installed on your laptop.</em></b></p>
<p>You will need working copies of the software described below.
</p>
<h3>Overview</h3>
<div class="row-fluid">
<div class="span6">
<h4>Editor</h4>
<p>
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.
The default text editor on Mac OS X and Linux is usually set to Vim,
which is not famous for being intuitive.
if you accidentally find yourself stuck in it,
try typing the escape key,
followed by ':q!' (colon, lower-case 'q', exclamation mark),
then hitting Return
to return to the shell.
</p>
<h4>The Bash Shell</h4>
<p>
Bash is a commonly-used shell. Using a shell gives you
more power to do more tasks more quickly with your
computer.
</p>
<h4>Git</h4>
<p>
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 <a href="https://github.com/">github.com</a>.
</p>
</div>
<div class="span6">
<h4>Python</h4>
<p>
Python is becoming very popular in scientific computing,
and it's a great language for teaching general programming concepts due to its easy-to-read syntax.
We teach with Python version 2.7,
since it is still the most widely used.
Installing all the scientific packages for Python individually can be a bit difficult,
so we recommend an all-in-one installer.
</p>
</div>
</div>
<h3>Windows</h3>
<div class="row-fluid">
<div class="span6">
<h4>Python</h4>
<ul>
<li>
Download and install <a href="http://continuum.io/anacondace.html">Anaconda CE</a>.
</li>
<li>
Use all of the defaults for installation
<em>except</em>
make sure to check <strong>Make Anaconda the default Python</strong>.
</li>
</ul>
<h4>Git Bash</h4>
<p>
Install Git for Windows by download and running
<a href="http://msysgit.github.io/">the installer</a>.
This will provide you with both Git and Bash in the Git Bash program.
</p>
<h4>Software Carpentry Installer</h4>
<p>This installer requires an active internet connection</p>
<p>After installing Python and Git Bash:</p>
<ul>
<li>
Download the <a href="http://files.software-carpentry.org/SWCarpentryInstaller.exe">installer</a>.
</li>
<li>
If the file opens directly in the browser select <strong>File→Save Page As</strong>
to download it to your computer.
</li>
<li>
Double click on the file to run it.
</li>
</ul>
</div>
<div class="span6">
<h4>Editor</h4>
<p>
<code>nano</code> is the editor installed by the Software Carpentry Installer,
it is a basic editor integrated into the lesson material.
</p>
<p>
<a href="http://notepad-plus-plus.org/">Notepad++</a> is a
popular free code editor for Windows.
Be aware that you must add its installation directory to your system path
in order to launch it from the command line
(or have other tools like Git launch it for you).
Please ask your instructor to help you do this.
</p>
</div>
</div>
<h3>Mac OS X</h3>
<div class="row-fluid">
<div class="span6">
<h4>Bash</h4>
<p>
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 <code>/Applications/Utilities</code>). You may want
to keep Terminal in your dock for this workshop.
</p>
<h4>Editor</h4>
<p>
We recommend
<a href="http://www.barebones.com/products/textwrangler/">Text Wrangler</a> or
<a href="http://www.sublimetext.com/">Sublime Text</a>.
In a pinch, you can use <code>nano</code>,
which should be pre-installed.
</p>
<h4>Git</h4>
<p>
Install Git for Mac by downloading and running
<a href="http://git-scm.com/downloads">the installer</a>. For older
versions of OS X (10.5-10.7) use the most recent available
installer <a href="https://code.google.com/p/git-osx-installer/downloads/list">available
here</a>. Use the Leopard installer for 10.5 and the Snow Leopard
installer for 10.6-10.7.
</p>
</div>
<div class="span6">
<h4>Python</h4>
<ul>
<!--li>
Download and install <a href="http://continuum.io/anacondace.html">Anaconda CE</a>.
</li>
<li>
Use all of the defaults for installation
<em>except</em>
make sure to check <strong>Make Anaconda the default Python</strong>.
</li-->
<li>You need to first install xcode,
<ul>
<li>xcode can be installed by going to the App Store. You need to install xcode, then goto the top left of your screen and click XCode -> Preferences -> Downloads, find "command line tools" and click install.</li>
<li>xcode is a 1GB+ download so you will not have time to download it in class on Wednesday</li>
<li>Note that the current version of xcode is only supported by OSX 10.7.4+ so we highly recommend you upgrade your operating system. If for whatever reason you absolutely cannot upgrade your os, you need to register for a free Apple developer account and download the appropriate version of xcode</li>
</ul></li>
<li>For 64 bit OSX, install <a href="https://store.continuum.io/cshop/anaconda">Anaconda CE</a>
<ul>
<li>By default this is installed in your home directory. Unless you know what you're doing, don't change it.</li>
</ul></li>
<li>For 32 bit OSX, install <a href="https://www2.enthought.com/accounts/register/?next=/licenses/academic">EPD academic</a></li>
<li>Remember to read the <a href="http://docs.continuum.io/anaconda/install.html">documentation</a></li>
<li>Remember to configure your <a href="#env">environment</a></li>
</ul>
</div>
</div>
<h3>Linux</h3>
<div class="row-fluid">
<div class="span6">
<h4>Bash</h4>
<p>
The default shell is usually <code>bash</code>,
but if your machine is set up differently
you can run it by opening a terminal and typing <code>bash</code>.
There is no need to install anything.
</p>
<h4>Git</h4>
<p>
If Git is not already available on your machine you can try
to install it via your distro's package manager
(e.g. <code>apt-get</code> or <code>yum</code>).
</p>
<h4>Editor</h4>
<p>
<a href="http://kate-editor.org/">Kate</a> is one option for Linux users.
In a pinch, you can use <code>nano</code>,
which should be pre-installed.
</p>
</div>
<div class="span6">
<h4>Python</h4>
<p>
We recommend the all-in-one scientific Python installer
<a href="http://continuum.io/downloads.html">Anaconda</a>.
(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 workshop.)
</p>
<ol>
<li>
Download the installer that matches your operating
system and save it in your home folder.
</li>
<li>
Open a terminal window.
</li>
<li>
Type <pre>bash Anaconda-</pre> and then press
tab. The name of the file you just downloaded should
appear.
</li>
<li>
Press enter. You will follow the text-only
prompts. When there is a colon at the bottom of the
screen press the down arrow to move down through the
text. Type <code>yes</code> and press enter to approve
the license. Press enter to approve the default
location for the files. Type <code>yes</code> and
press enter to prepend Anaconda to
your <code>PATH</code> (this makes the Anaconda
distribution the default Python).
</li>
<li> <strong>Hints</strong>
<ul>
<li>Try to install in your HOME directory (default) so you don't need sudo</li>
<li>Don't invoke the installer shell using sudo if installing into HOME directory</li>
<li>Remember to configure your <a href="#env">environment</a></li>
<li>Remember to read the <a href="http://docs.continuum.io/anaconda/install.html">documentation</a></li>
</ul>
</li>
</ol>
</div>
</div>
<div class="row-fluid">
<h4>Virtual Machine</h4>
<p>
Sometimes the instructions above don't work. One way around this is
to use a virtual machine (VM)
rather than install software on your own computers. If all else fails, we will set you
up with a Linux virtual machine. You can try this using the following instructions
and then follow the Linux instructions:
<ul>
<li>Download and unzip the <a href="http://www2.epcc.ed.ac.uk/%7Emichaelj/SoftwareCarpentry/">VM image</a>. </li>
<li>Download <a href="https://www.virtualbox.org/wiki/Downloads">VirtualBox</a></li>
<li>Run the installer</li>
<li>Open VirtualBox Manager</li>
<li>Click "New" to create new virtual machine</li>
<li>Select "Linux" for Type and "Ubuntu" or "Ubuntu (64-bit)" for Version</li>
<li>Next, allocate half of your memory for your VM.<br></li>
<li>Next, select "Use an existing virtual hard drive file" and select the VDI file you downloaded</li>
<li>Once the VM has been created, select it and click "Start"</li>
<li>If the VM image you downloaded already has <em>guest-additions</em> installed then you can skip this step. Otherwise once the setup is complete you need to install <a href="http://virtualboxes.org/doc/installing-guest-additions-on-ubuntu/">guest additions</a>.</li>
</ul>
<!--We will provide VM image in advance to the workshop.-->
</p>
<!--ol-->
<!--li-->
<!--Install <a href="https://www.virtualbox.org/">VirtualBox</a-->
<!--/li-->
<!--li-->
<!--Download our <a href="{{site.vm_url}}">VM image</a-->
<!--strong>Warning:</strong-->
<!--this file is 1.7 GByte,-->
<!--so please download it <em>before</em> coming to your workshop.-->
<!--/li-->
<!--li-->
<!--Load the VM into VirtualBox by selecting "Import Appliance"-->
<!--and loading the <code>.ova</code> file.-->
<!--/li-->
<!--/ol-->
</div>
<h3>Installing matplotlib</h3>
<div class="row-fluid">
<p align="justify">
<code>matplotlib</code> doesn't come with the standard Python installation. In addition,
it depends on another library called <a href="http://www.numpy.org/">numpy</a>; which
is also not included. The <a href="http://matplotlib.org/users/installing.html">
installing matplotlib page </a> provides detailed instructions for installing <code>
matplotlib</code> on Windows, Mac OS X, and Linux. Don't forget to
<a href="http://www.scipy.org/install.html">download and install</a> numpy as well.
</p>
<p align="justify">In order to choose the correct downloads, you need to know which version of Python
you're running. At the command-line, run <tt>python --version</tt> (ours says Python 2.7.2+).
The first two numbers (2.7 for me) will give you an idea of which <tt>matplotlib</tt> file
to choose. On Windows, we
<a href="http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/">
downloaded the file</a> named "matplotlib-1.1.0.win32-py2.7.exe" because we have Python 2.7
and a 32-bit installation of Python. The
<a href="http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/">numpy downloads</a>
are named similarly; we downloaded "numpy-1.6.1-win32-superpack-python2.7.exe".
</p>
<p>Once everything is installed, you can check that it's working by running
<tt>python</tt> and typing in the following code:
</p>
<pre>from matplotlib import pyplot</pre>
<p>If no errors are printed, then you should be set.</p>
</div>
<!--h3>Installing IPython</h3>
<div class="row-fluid">
<p align="justify">
<code>IPython</code> provides a rich toolkit to help you make the most out of using Python
interactively. The <a href="http://ipython.org/ipython-doc/2/install/install.html">
installing IPython page </a> provides detailed instructions for installing <code>
IPython</code> on Windows, Mac OS X, and Linux.
</p>
</div-->
<p><a id="env"></a></p>
<h3>Extra Help: Configuring environment variables</h3>
<ul>
<li>Modify your shell configuration file, henceforth referred to as your <em>bashrc file</em>.
<ul>
<li>Mac OSX: From your home directory (i.e., ~/) open either .bash<em>profile or .bash</em>aliases (create one if neither exists), add "export PATH=/path/to/python:$PATH"</li>
<li>Linux: From your home directory (i.e., ~/) open .bashrc (create one if neither exists), add "export PATH=/path/to/python:$PATH"</li>
</ul></li>
<li>Refresh your terminal by typing
<code>
source ~/.bashrc
</code>
or just opening a new terminal.</li>
</ul>
<h2>Before the workshop</h2>
<p>
There are a three extra tasks to undertake before the workshop in
order to help make sure things run smoothly. Please try to do the
following.
</p>
<div class="row-fluid">
<div class="span6">
<h3>1. Grab free accounts</h3>
<p>
If you haven't already, please register for free accounts to
<ul>
<li>Make use of Github. Register <a href='https://github.com/'>here</a> and don't forget your password. We will use this service as part of the lesson on version control.</li>
<li>Use the Met Office datapoint API. Register for an account
<a href='http://register.metoffice.gov.uk/register/datapoint'>here</a>. We will use this as a data source for some of the exercises.</li>
</ul>
</p>
<h3>2. Take a look at Python</h3>
<p>
If you are new to Python, or you fear that your Python is rusty, it
may be worth taking a look at an online introduction. Christopher
Woods has a nice short introduction
<a href='http://chryswoods.com/beginning_python'>here</a>.
If you can follow this as
far as "conditions", you are good to go. We will be reviewing this
material anyway, so don't worry if you get stuck.
</h>
</div>
<div class="span6">
<h3>3. Check your setup</h3>
<p>
Finally, it is worth checking your setup, following the steps outlined
below.
</p>
<ul>
<li>
Download <a href="./setup/installation_test_1.py">installation_test_1.py</a>
</li>
<li>Open up a bash shell</li>
<li>Change into the directory where you put the script</li>
<li>Run the script:
<pre>python installation_test_1.py</pre>
</li>
</ul>
<p>
To check you have the necessary software and tools:
</p>
<ul>
<li>
Download <a href="./setup/installation_test_2.py">installation_test_2.py</a>
</li>
<li>Open up a bash shell</li>
<li>Change into the directory where you put the script</li>
<li>Run the script:
<pre>python installation_test_2.py</pre>
</li>
</ul>
</div>
<h2>During the workshop</h2>
<p> We will make use of <a href="https://etherpad.mozilla.org/NGCMG-SSI-Workshop-June2015">this etherpad</a> during the workshop. Please use this to
keep collaborative notes and ask (and answer) each others questions. </p>
</div>
</div>
</div>
</article>
<div class="footer">
This work is derived from prior works that are Copyright © <a href="http://software-carpentry.org">Software Carpentry</a>
<a class="label swc-blue-bg" href="LICENSE.html">License</a>
<a class="label swc-blue-bg" href="https://github.com/softwaresaved/NGCMGSoton-2015-06-21">Source</a>
</div>
<!-- Javascript placed at the end of the document so the pages load faster. -->
<script src="{{site.swc_site}}/js/jquery-1.9.1.min.js"></script>
<script src="{{site.swc_site}}/js/bootstrap/bootstrap.min.js"></script>
</body>
</html>