Sage Math

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SMU Classification: Restricted

SageMath
We have two options to run our main tool for the course, SageMath.
1. Use the Cloud/CoCalc Version
• Go to https://cocalc.com
• Create an account and sign in
• Create a Project
• Add a New File

• Select the SageMath kernel

CS103: SageMath Installation Guide


SMU Classification: Restricted

2. Install SageMath on Your PC (Recommended as a backup)


Sage works well installed on your PC, both on Mac as well as Windows. Here are the steps.
1. Go to http://www.sagemath.org/
2. Click Download 9.2 (The current version is 9.2)

3. Select any download server: e.g: KAIST, Republic of Korea

2(a) How to Install on a Mac


1. Click on Apple Mac OS X in the Mirror Content

CS103: SageMath Installation Guide


SMU Classification: Restricted

2. We will be using the version 9.1 for Mac this year because the latest version is 9.2
requires us to install some extra libraries.
3. Download the DMG file with a name like sage-9.1-*-OSX_10.11.6-
x86_64.app.dmg (Do not download the first one without .app. in the name.)

4. Mount the downloaded DMG file by double-clicking on it. It will take a while to verify
and load.
5. Copy the SageMath-9.1.app bundle from the mounted disk image to your
/Applications by dragging it as shown in the mount window of the disk image.
6. It may take up to five minutes. Be patient!
7. Go to your /Applications folder (shortcut Shift-Command A in a Finder window)
and right-click on SageMath-9.1.app. Double-clicking to open it may not work! Select
the Open option. (You will see the version 9.1, instead of 8.8 as shown in the screenshot)

8. Say Open to the unidentified publisher warning. Double-clicking does not give the Open
option! (You will see the version 9.1, instead of 8.8 as shown in the screenshot)

CS103: SageMath Installation Guide


SMU Classification: Restricted

9. It may take a long time start up. Be patient.


10. Once open, Sage should start a Jupyter server and open its interface in your web
browser.
11. If not, use the Server menu of the running Sage application to Start Jupyter.

12. It may be much faster to launch it from a Terminal. Open a Terminal and type in
/Applications/SageMath-9.1.app/sage -n Jupyter
13. Any of the last three steps (9, 10 or 11) will result in a Jupyter interface on your web
browser.
2(b) How to Install on Windows
1. Click on Microsoft Windows in the Mirror Content
2. Click the installer for version 9.1, SageMath-9.1-Installer-*.exe to download it
3. Double-click the downloaded installer SageMath-9.1-Installer-v*.exe
4. If you see a warning like below, click on Run anyway (You will see the version 9.1,
instead of 8.8 as shown in the screenshot)

5. Follow the wizard to agree to the license, select folders etc.


6. If you have selected Create Desktop Icons, you will see the launch icons on your
desktop
7. Double click on the SageMath 9.1 Notebook icon to open the SageMath notebook.
It first launches a “SageMath Notebook Server” terminal as below. Keep it running.

CS103: SageMath Installation Guide


SMU Classification: Restricted

3. Using the Jupyter Notebook


1. The Jupyter notebook that opens in a browser is the same Mac and Windows. (You will see
the version 9.1, instead of 8.8 as shown in the screenshot)

2. Once the SageMath server is running, you can launch the jupyter notebook in any browser
by accessing: http://localhost:8888
3. If you see a “Password or token” prompt, you can get the token from the notebook server
terminal. In this case it is – “d4ab2cb6af9fbabfdb76be4a1527c5fcf20bf608b38935e3”. You can
get this value from

Reference Manual
• Go to http://doc.sagemath.org/html/en/reference/
• Click on Linear Algebra in the sidebar

CS103: SageMath Installation Guide

You might also like