Much of the material in this document is taken from Appendix H.1 in the book A Primer on Scientific Programming with Python, 4th edition, by the same author, published by Springer, 2014.

VirtualBox virtual machine

VirtualBox is free software that allows you to run a virtual machine with, e.g., the Ubuntu operating system. Download and install VirtualBox. Choose the version according to the operating system on the host. On Mac OS X, choose VirtualBox x.y.z for OS X hosts, where x.y.z is the version number of VirtualBox. Double click the downloaded .dmg file to install Vagrant. Those who work on a Windows machine will select VirtualBox x.y.z for Windows hosts, which downloads an .exe file to be double clicked to perform the installation.

The next step is to download a full-blown, pre-built Ubuntu machine with a lot of tools for doing scientific computing. Go to http://goo.gl/nSeBCg and download the file ubuntu-14.04-amd64.ova (6.4 Gb!). We refer to the VirtualBox manual for how to import such a machine. The username and password for the virtual machine are fenics.

Pre-i3/5/7 Intel processors and 32 vs. 64 bit. If your computer has a pre-i3/5/7 Intel processor and the processor does not have VT-x enabled, you cannot use the pre-packaged 64-bit virtual machines. Instead, you have to download a plain 32-bit Ubuntu image and install the necessary software (see the section Installing software on a minimalistic Ubuntu machine). To check if your computer has VT-x (hardware virtualization) enabled, you can use this tool: https://www.grc.com/securable.htm.

Dual boot on Windows

Instead of running Ubuntu in a virtual machine, Windows users also have the option of deciding on the operating system when turning on the machine (so-called dual boot). The Wubi tool makes it very easy to get Ubuntu on a Windows machine this way. There are problems with Wubi on Windows 8, see instructions for how to get around them. It is also relatively straightforward to perform a direct install of Ubuntu by downloading an Ubuntu image, creating a bootable USB stick on Windows or Mac, restarting the machine and finally installing Ubuntu. However, with the powerful computers we now have, a virtual machine is more flexible since you can switch between Windows and Ubuntu as easily as going from one window to another.