Ask Your Question

Revision history [back]

SageMath and Spyder on macOS

Via Conda

One way to go is to install both Sage and Spyder via Conda.

Start from scratch

The "Conda" section of the installation guide explains how to start from scratch by installing Miniconda.

Follow the instructions there, but when creating the environment, make sure to add Spyder (and any extra things if needed):

$ conda config --add channels conda-forge
$ conda create -n sage sage python=3.7 spyder=4

Already have Anaconda

In case Anaconda is already there, all that is left to do is to - either create a "sage" Conda environment with the "sage" Conda package from the conda-forge channel - or install the "sage" Conda package (from the conda-forge channel) into an existing Conda environment In either case, use the Anaconda prompt and type in appropriate commands.

Then in Anaconda navigator, select the "sage" Conda environment (or the environment in which the "sage" Conda package was installed) and launch Spyder.

Related: Stack Overflow question 43592879: How to change Python version in Anaconda Spyder.

Via a downloaded dmg

Instead of using Conda, one might want to use a Sage version downloaded from the SageMath download page.

I don't know how that would work. One would need to either let an existing Spyder know to use Sage's Python, or to install Spyder for Sage's Python.

Hopefully someone can expand on that approach if there is an interest (please leave a comment to indicate interest in this).

Further reading