Install
Install Scala
Pick your platform below to install everything necessary to use the latest Scala release from a command line:
Install Scala with Homebrew by running the following command in your terminal:
brew install scala
Install Scala with cs setup, the Scala installer powered by Coursier, following the on-screen instructions.
On the Apple Silicon (M1, M2, …) architecture:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-aarch64-apple-darwin.gz | gzip -d > cs && chmod +x cs && (xattr -d com.apple.quarantine cs || true) && ./cs setup
Otherwise, on the x86-64 architecture:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-apple-darwin.gz | gzip -d > cs && chmod +x cs && (xattr -d com.apple.quarantine cs || true) && ./cs setup
Install Scala with cs setup, the Scala installer powered by Coursier.
The command below downloads the Coursier launcher (cs) and runs cs setup,
which installs Coursier and Scala.
Run the following command in your terminal, following the on-screen instructions.
On the x86-64 architecture:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
Otherwise, on the ARM64 architecture:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-aarch64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
Download and execute the Scala installer for Windows based on Coursier, and follow the on-screen instructions.
Install the Scala package with Chocolatey by running the following command in your terminal:
choco install scala
Install Scala with cs setup, the Scala installer powered by Coursier, which installs Coursier and Scala.
Follow the documentation from Coursier on how to install and run cs setup.
Check your setup with the command scala -version, which should output:
$ scala -version
Scala code runner version 3.9.0 -- Copyright 2002-2022, LAMP/EPFL
If that does not work, close and reopen your terminal; otherwise, you may need to log out and log back in (or reboot) in order for the changes to take effect.
If you are just beginning your journey with Scala, we recommend that you read our getting started guide, which expands upon these details, teaching you how to build your first Scala project:
Get Started with Scala
Which version of Scala should I choose?
There are 2 distribution lines of Scala 3:
- Scala Next currently 3.10.0 - The default to be used by most users, containing the latest features, bug fixes and improvements.
- Scala LTS currently 3.9.0 - Advised to be used for publishing libraries.
Other ways to install Scala
Each Scala release has its own page listing alternative installation methods. Click the button above to see the full list of Scala releases, or pick from the most recent releases below.