Julia and JuMP Tutorial for JuMP-dev III
This page includes the install and use instructions for the Julia and JuMP tutorials at JuMP-dev III. These are the recommended and supported instructions for the course as they are simple, safe and self-contained.
To get started, you first need to install Julia.
- Download and install Julia v1.1 from https://julialang.org/downloads/.
Windows 7 Users: as instructed on the downloads page, you will need to install at least version 3.0 of the Windows Management Framework.
Download the materials
To get the tutorial materials download this zip file and uncompress it to a folder of your choice. This will create a sub-folder
JuMP-dev-2019-tutorial with all the materials.
Now open Julia by clicking on the Julia icon you installed. Once open, you should be faced with the Julia REPL (Julia's interactive command prompt) that looks like this:
Now we need to install Jupyter. In the Julia REPL, run the following commands (this may take a little bit of time):
import Pkg ENV["JUPYTER"]="" Pkg.add("Conda") Pkg.add("IJulia") import Conda Conda.add("jupyter")
Open a Jupyter notebook
Okay, last step, let's launch a Jupyter notebook! Open a Julia REPL and then run:
using IJulia IJulia.notebook()
If all goes well, a browser window will open that looks like this:
To get started on the tutorials, click on the first notebook entitled
Introduction to Julia-JuMP.ipynb.
Using the Default Tutorial Packages
Manifest.toml contain the information about versions of the default tutorial packages that we know work well. These packages can be activated by running the following code in any Jupyter notebook in the
import Pkg Pkg.activate(@__DIR__) Pkg.instantiate()
You will see this as the first code cell in all example notebooks and you should add it to all the notebooks you create.
Updating Course Files and Packages
To get the latest version of this repository (files and safe versions of packages) simply re-download this zip file, which always contains the latest versions.