Install Scala with cs setup (recommended)
To install Scala, it is recommended to use
the Scala installer powered by Coursier. It installs everything necessary to use the latest Scala release from a
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 execute the Scala installer for Windows based on Coursier, and follow the on-screen instructions.
Follow the documentation from Coursier on how to install and run
Check your setup with the command
scala -version, which should output:
$ scala -version Scala code runner version 3.2.2 -- Copyright 2002-2022, LAMP/EPFL
If that does not work, 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.