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.
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.
To do Sage development on Windows, follow these steps.
- Install your favorite flavor of linux (Ubuntu, Fedora, etc.) on a new VM:
Download a copy of the installation cd image (the file extension is .iso). Continue onto the next steps while this is downloading.
In VirtualBox, click New and then Next.
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.
- 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.
- 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.
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.
Click Start and it will boot using the installation CD. Follow the instructions to setup your Linux VM.
- 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.
- Start your development VM. Everything after here takes place in the VM.
Open a browser and download Sage.
Untar Sage and navigate to the [path to folder]/sage-[version number] folder.
Run make and wait multiple hours (with a 1 GB RAM VM, it can take 10 hours).
Run ./sage -combinat install.
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!
- If the Sage-Combinat fails to install.
The typical problem is that the Sage-Combinat queue is currently broken and you will need to wait until it is restored.
- If you do not have internet in your VM.
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.
- If your mouse disappears.
This means that a VM has grabbed control of the mouse, so press the host key (the default is the right control [ctrl] key).
- If you need to change the amount of RAM given to your VM.
Go into Settings/System and change the RAM from the motherboard tab.
- If you need to expand the size your VM's hard disk.
This is not easy. Instead create a new hard disk under Settings/Storage using a SATA controller.
- If you need to shrink the size of your VM's hard disk.
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.
- If you continue to have problems.
Go to the Sage-Combinat Google group and post a message there.
FAQ and Terminology
- VM - Virtual machine
- OS - Operating system
- HD - Hard disk
- Host OS - The OS running directly from the computer (if you are here, this is almost certainly Windows)
- Guest OS - The OS running inside of the VM
VBox - VirtualBox
- Ctrl - Control key