tl;dr: how can I install optional sage packages on archlinux?

Quoting the Arch wiki page for sage:

Most if not all of the standard sage packages are available as Arch packages and exposed as (optional) dependencies of sagemath, so there is no need to install them with sage -i.

Alas, the (very) nauty package is an optional one, and so cannot be installed from with pacman.

The error I get when trying the standard sage -i nauty (either with or without sudo) is

/usr/bin/sage: line 297: ./sage: No such file or directory

This is documented in the talk page (of the Arch Wiki) for Sage (as in "this happens"). That page does not discuss workarounds.

So far I have been unable to find any reference or guidance in installing optional packages.

Any reference would be warmly welcomed!


The command pacman -Si sagemath lists all optional dependencies for Sagemath available through pacman (see the archlinux wiki article, thanks Lahwaacz!).

$ pacman -Si sagemath
Optional Deps   : 
           nauty: for generating some classes of graphs

So all that is needed is to install nauty: sudo pacman -Syu nauty, and you may run it to your heart's content (examples here).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.