Welcome to the Sage Installation Guide!#

If you are reading this manual at https://doc.sagemath.org/, note that it was built at the time the most recent stable release of SageMath was made.

More up-to-date information and details regarding supported platforms may have become available afterwards and can be found in the section “Availability and installation help” of the release tour for each SageMath release.

Where would you like to run SageMath? Pick one of the following sections.

macOS#

  • Do you want to do SageMath development?

Windows#

  • Do you want to do SageMath development?

    • Yes, development:

      Enable Windows Subsystem for Linux (WSL) by following the official WSL setup guide. Be sure to do the steps to install WSL2 and set it as default. Then go to the Microsoft Store and install Ubuntu (or another Linux distribution). Start Ubuntu from the start menu.

      Then follow the instructions for development on Linux below.

    • No development:

      • Enable Windows Subsystem for Linux (WSL) by following the official WSL setup guide. Be sure to do the steps to install WSL2 and set it as default. Then go to the Microsoft Store and install Ubuntu (or another Linux distribution). Start Ubuntu from the start menu.

        On the Linux running on WSL, you always have root access, so you can use any of the installation methods described below for Linux.

Linux#

  • Do you want to do SageMath development?

    • Yes, development:

      Obtain the SageMath sources via git as described in The Sage Developer’s Guide.

    • No development: Do you have root access (sudo)?

      • Yes, root access: Then the easiest way to install SageMath is through a Linux distribution that provides it as a package. Most major Linux distributions have up-to-date versions of SageMath, see repology.org: sagemath for an overview. See Linux package managers for additional information.

        If you are on an older version of your distribution and a recent version of SageMath is only available on a newer version of the distribution, consider upgrading your distribution. In particular, do not install a version of Sage older than 9.2.

      • No root access, or on an older distribution Install SageMath from the conda-forge project, as described in section Install from conda-forge.

      • Alternatively, build SageMath from source as described in section Install from Source Code.

In the cloud#

More information:

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.