Installing Julia

Contents

Installing Julia#

  1. Go to https://julialang.org/downloads. and download the current stable release, Julia x.yy.z, using the correct version for your operating system (Linux x86, Mac, Windows, etc).

  2. After installing, make sure that you can run Julia. On some systems, this means searching for the “Julia x.yy.z” program installed on your computer; in others, it means running the command julia in a terminal.

This puts you in the Julia REPL – an interface which lets you line-by-line run Julia commands. Test it out by typing 1+1 and then “enter.” Hint: If everything is working you should get 2

  1. Inside the Julia REPL type ] (closing square bracket)

The Julia prompt should change to “pkg>” and turn blue, telling you that you are now in package manager mode. This mode allows you to do operations on packages (also called libraries).

To install Jupyter, run the following (case sensitive) command to add (install) the package to your system by downloading it from the internet. You should only need to do this once for each installation of Julia:

add IJulia

Note: the IJ should be capitalized.

  1. Exit the package manager by hitting back-space or delete

  2. To start Jupyter in Notebook mode type using IJulia; notebook(). Alternatively, to start it in Jupyterlab mode type using IJulia; lab(). It may ask if you want to install some software using conda. Respond with y.

Note: If you already have Jupyter installed (for example via Anaconda) then I believe the command add IJulia adds the Julia kernel to your existing install.

  1. In the future you should be able to start Jupyter from the REPL, or from a terminal command line. If you install Jupyter through Anaconda, you will also get an icon you can click to start it.

VSCode#

You can also install Julia through VSCode. I recommend against doing this for your main Julia interface for this course. I set things up to work with Jupyter, and I can’t guarentee they will work with the VSCode notebook viewer. (Of course – feel free to play with it. It may work great, but it also may be frustrating.)