Sage Development on Windows

Before You Begin

Download a virtual machine (VM) program. For this guide we will be using VirtualBox (sometimes refered to as VBox). Download and install VirtualBox with all of the standard settings.

Sage Notebook Server

To do a basic installation of Sage on Windows, download the latest notebook release from the Sage website. Open VirtualBox and click File/Import Appliance, then Choose and select the file you downloaded. Click Next and everything should be automatically set up, then Import. After the process completes, select the VM (the default name is Sage-[version number]), and click Start. As soon as the VM has fully booted, follow the instructions to begin running the Sage notebook.

WARNING: I highly recommend that you do not attempt any sage development running from the notebook server. Instead see the setion on Sage Development as you will have more tools and a better interface. However, if you wish to, development works the same as normal (from the Sage shell).

NOTE: If your mouse disappears, do not panic. What has occurred is VirtualBox has "grabbed" your mouse control and since the VM is text-only, it will not display a mouse pointer. To release the mouse, press the host key (the default is the right control [ctrl] key.

Sage 4.x and below

To install Sage-Combinat, hit ctrl-c twice to exit to the Sage-shell. From there, run the following:

sage -combinat install

which will install the Sage-Combinat patches and queue. If you encouter problems, see the section on troubleshooting Sage(-Combinat) installs.

To restart the Sage notebook server, input the command exit.

Sage 5.0

To install Sage-Combinat, you will need to first go to the command line terminal by pressing [host_key]-F1 where the default [host_key] the right control key. Next type sage in the login, followed by sage for the password. If you only have an underscore in the upper right-hand corner, press [host_key]-F2, followed by [host_key]-F1. You should be at the sage terminal, so then input

sage -combinat install

and after combinat is done installing, type exit and restart the VM.

Sage Development

To do Sage development on Windows, follow these steps.

  1. Install your favorite flavor of linux (Ubuntu, Fedora, etc.) on a new VM:
    1. Download a copy of the installation cd image (the file extension is .iso). Continue onto the next steps while this is downloading.

    2. In VirtualBox, click New and then Next.

    3. Input a name for the VM (e.g. Sage Devel), click the drop down menu for OS type and change it to linux and set version to the type of linux you chose. Click Next.

    4. Set the amount of RAM for the VM. I recommend giving it at least 1GB (1024 MB), but not more than half of your computer's RAM. The more RAM the machine has, typically the faster it will run.
    5. Create a new hard disk (HD) by using all of the default options (file type VDI and dynamically allocated) and giving it 10-20 GB.
    6. Click Create.

    7. Click Settings after selecting your new VM, then Storage. Select the IDE Controller and then add CD/DVD device icon (it looks like a CD with a green plus[+] sign). From the popup menu, click Choose disk and select the .iso you downloaded. Next click System and check to make sure the CD/DVD-ROM is higher in the boot order than the hard disk. If it is not, select the CD/DVD-ROM and click the up arrow until it is.

    8. Click Start and it will boot using the installation CD. Follow the instructions to setup your Linux VM.

    9. Remove the disk from the virtual drive (you can also remove the additional CD drive from the VM) and/or lower the boot priority of the CD/DVD-ROM drive.
  2. Start your development VM. Everything after here takes place in the VM.
  3. Open a browser and download Sage.

  4. Untar Sage and navigate to the [path to folder]/sage-[version number] folder.

  5. Run make and wait multiple hours (with a 1 GB RAM VM, it can take 10 hours).

  6. Run ./sage -combinat install.

  7. Develop!

Optional: If you want to set up an alias, go into ~/.bashrc and add

alias sage='[path to folder]/sage-[version number]/sage'

to the end of the file. Remember that when you want to upgrade sage that you have to change this alias!

Troubleshoot Guide

The typical problem is that the Sage-Combinat queue is currently broken and you will need to wait until it is restored.

Check to see if you have internet from your host OS (i.e. through your favorite browser from Windows). If you do, there can be an intermitent problem if you have reopened your VM from a saved state, and the solution is to restart the VM.

This means that a VM has grabbed control of the mouse, so press the host key (the default is the right control [ctrl] key).

Go into Settings/System and change the RAM from the motherboard tab.

This is not easy. Instead create a new hard disk under Settings/Storage using a SATA controller.

This is not easy. I'd suggest copying essential files through a shared folder or to a new small HD attached to the VM and then deleting the HD and creating a new one for your VM.

Go to the Sage-Combinat Google group and post a message there.

FAQ and Terminology

combinat/SageDevelWindows (last edited 2012-08-24 21:35:15 by tscrim)