Figure 1: Screenshot showing the SageMath 6.8 Notebook

Figure 1: Screenshot showing the SageMath 6.8 Notebook solving the Lotka-Volterra equations

SageMath is a free and open-source mathematics software written in Python and Cython that integrates several other pieces of free mathematics software in a common command-line/browser-based notebook interface. It can be installed on Sabayon via two major methods: A.) using Portage and B.) compiling from source manually. Of these option A is usually easiest, but it will take some time to do nonetheless. Option B is something I have not tried on Sabayon in recent memory, because I know from trying this on other distributions (such as Fedora and Ubuntu) that it is a nightmare unless you have a photographic memory of all of SageMath’s dependencies and known build issues on Gentoo/Sabayon.

If you need further assistance than this post provides on installing SageMath using Portage, I suggest you ask for it at the Sabayon forums, as I am not experienced enough with Portage to be able to provide much further assistance (in fact you will find most information provided by this post in the answer to a question I asked in the Sabayon forums). Alternatively you can start another issue in the sage-on-gentoo overlay GitHub repository, detailing any errors you have encountered with this build (although you should only add issues there relating to failed builds of the sage package or other packages provided by the sage-on-gentoo overlay).

Installing SageMath using Portage

An up-to-date SageMath ebuild can be found in the sage-on-gentoo overlay. To add this overlay to layman run:

root #  layman -a sage-on-gentoo

Then sync emerge and layman with:

root #  emerge –sync && layman -S

After this what you do is up to you, but I would recommend you run and take note of the output of:

root #  emerge -pv sci-mathematics/sage

try to install as many of the dependencies as possible with root #  equo i <PACKAGE>. Then run:

root #  emerge sci-mathematics/sage
root #  equo rescue spmsync && equo mask sci-mathematics/sage

to emerge the remaining dependencies (should be >20, by the way) and then SageMath itself. You may need to fiddle around with USE flags and masked packages, to get this to work, however. For example, you may need to add the following line in /etc/portage/package.use/gentoo.use:

before emerging sage. By the way, if you have the science overlay added, you may wish to add the following lines to /etc/portage/package.mask/gentoo.mask:

before you emerge sage and its remaining dependencies, as I know from my own personal experience that these packages often give out errors while compiling, although their counterparts in the main Gentoo overlay do not.