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?

On 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.

      • No root access: 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.

On macOS:

On Windows:

  • Do you want to do SageMath development?

    • Yes, development:

      Enable Windows Subsystem for Linux (WSL), selecting any Linux distribution, for example Ubuntu. Then follow the instructions for development on Linux.

    • No development:

      • Enable Windows Subsystem for Linux (WSL), selecting any Linux distribution, for example Ubuntu. On the Linux running on WSL, you always have root access, so you can use any of the installation methods described above for Linux.

      • Alternatively, in particular if you cannot use WSL, install Cygwin and then build SageMath from source as described in section Install from Source Code.

In the cloud:

  • CoCalc: an online service that provides SageMath and many other tools.

  • On any system that can allows you to bring your own Docker images to run in a container: Use the Docker image sagemath/sagemath.

  • Sage Cell Server: an online service for elementary SageMath computations.

More information:

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