This document contains step-by-step instructions to install the Julia language, together with the necessary additional tools / environments that we will use in the course.
Please follow the instructions carefully and one by one. You should be able to copy and paste from this document; otherwise you must be careful to use the correct capitalisation, e.g. IJulia
, not Ijulia
or ijulia
.
-
Download the current stable version of Julia (1.4.0) from https://julialang.org/downloads corresponding to your operating system, and install it.
-
For Linux you should download the "generic binary" and note where you save it on your machine (i.e. in which directory).
-
You may instead use your operating system's package installer (e.g.
homebrew
on Mac) to install Julia, provided that the version installed is at least 1.4.
-
-
Make sure that Julia runs and execute
1 + 1
. -
If you know how to do so, you probably want to set up some kind of link or alias so that you can run Julia from anywhere.
-
Browse through the Julia home page, have a look at the comprehensive Julia manual and a page with resources for learning the language.
We will use the Jupyter notebook computational environment. Install it as follows:
-
Run Julia.
-
At the Julia prompt
julia>
, type
julia> using Pkg
julia> Pkg.add("IJulia")
- When that has finished, at the Julia prompt
julia>
type
julia> using IJulia
julia> notebook()
- Answer
y
when asked if you want to install the Jupyter notebook.
A good alternative is to use the more modern JupyterLab. To do so, type jupyterlab()
instead of notebook()
.
- Install interactive capabilities that we will use:
julia> Pkg.add("WebIO")
julia> using WebIO
julia> WebIO.install_jupyter_nbextension()
If you use JupyterLab, replace the last line with julia> WebIO.install_jupyter_labextension()
.
- At the Julia prompt, type
julia> using Pkg
julia> Pkg.add("Plots")
julia> Pkg.add("Interact")
julia> Pkg.add("DataFrames")
julia> Pkg.add("CSV")
We will also use the Juno IDE (Integrated Development Environment). This consists of a set of plugins for the modern editor Atom. You can use Atom for editing all kinds of documents, not just Julia code.
-
Download and install the Atom editor from https://atom.io.
-
Run Atom.
-
In the Atom menu, choose
Preferences -> Install
and install the Atom package nameduber-juno
. This will install the Juno IDE, which is a collection of packages for Atom as well as some Julia packages for communicating with Atom. -
Save a file called
hello.jl
with the contents1 + 1
. -
Type
Shift-Enter
to run the code (with your cursor somewhere on the line containing1 + 1
). -
For more information about Juno, see the Juno home page.