Local Machine Setup
Overview
The following sections will help you install the necessary packages and programs on your operating system. Some steps may take a long time, please be patient. Read all instructions very carefully.
The output of each command is important, please pay careful attention to what each one prints. If you encounter an error message, do not ignore it. We will be available in office hours to help you get set up if you run into problems. As a general rule, no output means the command executed successfully.
Initial Setup
Windows
This will only work on Windows 10. If you are on an older version, you will probably need to set up a Linux VM. Follow the directions here to install the Windows Subsystem for Linux
macOS
Install the Homebrew package manager.
Install OCaml
These instructions assume you are running Linux (possibly via WSL) or macOS.
Install the OCaml package manager by running the command:
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
(when prompted for the installation location, just hit enter to select the default)
Run the command:
opam --version
You should be on version 2 (followed by some versions, just make sure the major version is 2). Check out the manual if this is not the case, you may have to follow special directions for your particular operating system and version.
If you encounter any issues, check out the manual
Initialized the OCaml package manager by running the command:
opam init
When prompted to modify
~/.zshrc
or~/.bash_profile
(or similar file), type “y”Run
source ~/.zshrc
orsource ~/.bash_profile
(or the file mentioned above)
Initialize OCaml
We will be using OCaml version 5 Run the command
ocaml -version
to check which version is currently installed
If you are already on 5.3.0, you can skip to step #4
Run the command
opam update
If you are on another version, run the command
opam switch 5.3.0
If you get an error saying that switch is not currently installed, run the command
opam switch create 5.3.0
This may take a while, please be patient
Run the command
eval $(opam env)
Ensure you are now on the correct version by running the command
ocaml -version
Install OCaml packages by running the command:
opam install ocamlfind ounit utop dune qcheck