Running Sagemath/Fpylll on Windows
Heads up: all these methods take some time to complete. These methods were tried on Windows 8.1 and 10, some should also run on Windows 7.
The official Sagemath Windows installer
Supports:
- Windows 7+
Pros:
- Does not require virtualisation.
- Should support most versions of Windows.
Cons:
- Results in a slower install.
Istructions:
- Get a copy of the installer from https://github.com/sagemath/sage-windows/releases.
- When running the installer, Windows Defender may complain. Choose to run anyway.
- Once setup is done, there should be three links on your desktop:
Sagemath
will open a console with Sage inside (it will take a while to start).Sagemath
shell will open a shell into the Cygwin system that Sage is installed into. Runsage
.Sagemath notebook
will first setup an interactive notebook. Then a browser window should open directing you to the notebook (or a Word document with a link to the right internal url, useCtrl + click
to open).
Windows Subsystem for Linux
Supports:
- Windows 10
Pros:
- Native virtualisation method for Windows 10.
Cons:
- First need to enable WSL.
Instructions:
- Enable WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10.
- Install a Linux distribution from the Microsoft Store, Ubuntu should be fine.
- Once Linux is running, run
sudo apt install sagemath
to get Sage. - Run
sage
.
Notes:
- You can access your Windows file system at
/mnt/c/
.
Docker Desktop
Supports:
- Windows 10 Pro or Enterprise
Pros:
- Easy to use, results in a fast install of Sage.
Cons:
- Limited Windows compatibility.
- Requires virtualisation.
What could go wrong:
- Machines running Windows 8+ may have virtualisation (VT-X/AMD-v) disabled by default. Enabling that can be a little tricky.
Instructions:
- Get the Docker Desktop for Windows installer from https://hub.docker.com/editions/community/docker-ce-desktop-windows/.
- Run the installer. Default configuration should work. It will require to restart.
- Run Docker Desktop. Once it's up, setup should be done.
- Run Powershell/CMD.exe. Try running
docker run hello-world
. It should successfully run. - Run
docker pull martinralbrecht/sagemath-g6k
. - Run Sage with
docker run -it martinralbrecht/sagemath-g6k
.
Virtual Box
Supports:
- OS X
- Windows 7+
Pros:
- You'll be running Linux directly.
Cons:
- Requires installing Linux, then Sage inside.
What could go wrong:
- Machines running Windows 8+ may have virtualisation (VT-X/AMD-v) disabled by default. Enabling that can be a little tricky.
Instructions:
- Get and install a copy of VirtualBox on https://www.virtualbox.org/wiki/Downloads depending on your machine's (host) operating system. Note: if running Windows 7, you may want to use an older build of VirtualBox from https://www.virtualbox.org/wiki/Download_Old_Builds, say 5.2 or earlier.
- Get a Linux distribution install image. A graphically lightweight is recommended when virtualising. Say, get the latest iso file for Xubuntu 19.10 from any of the mirrors on https://xubuntu.org/download/.
- Create a virtual machine and install Linux. In the case of Xubuntu 19.10, a VM with 1024MB of ram and 20GB of hard drive should suffice, but feel free to be more generous.
- Follow the default instructions to install Xubuntu.
- Once that's done, log into your Xubuntu install, and run
sudo apt update; sudo apt install sagemath
. - Run
sage
in your terminal.