Install
Install Scala withcs setup (recommended)
To install Scala, it is recommended to usecs setup
, the Scala installer powered by Coursier. It installs everything necessary to use the latest Scala release from a command line:
Run the following command in your terminal, following the on-screen instructions:
brew install coursier/formulas/coursier && cs setup
On the Apple Silicon (M1, M2, …) architecture:
curl -fL https://github.com/VirtusLab/coursier-m1/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
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/VirtusLab/coursier-m1/releases/latest/download/cs-aarch64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
Download and executethe Scala installer for Windows based on Coursier, and follow the on-screen instructions.
Follow the documentation from Coursier onhow to install and runcs setup
.
Check your setup with the commandscala -version
, which should output:
$ scala -versionScala code runner version 3.3.5 -- 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
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.