Sage is open source mathematical software released under the GNU General Public Licence GPLv2+, and includes packages that have compatible software licenses. People all around the globe have contributed to the development of Sage.
This repository is a copy of the official SageMath project with additional functionality to handle flag algebraic calculations. Explore the capabilities and functionalities of the package related to flag algebras by visiting the tutorial notebook.
Sage attempts to support all major Linux distributions, recent versions of macOS, and Windows (using Windows Subsystem for Linux or virtualization). The additional software and packages needed for flag algebraic calculations are only tested on a few Debian based distributions and on Mac. This guide is only guaranteed to work on Debian based distributions.
-
Prepare the environment:
- At least 10 GB of free space is required.
- Pick a path for the folder that will contain the source files. Note it can not contain spaces.
- After starting the build, you cannot move the source/build directory without breaking things.
- For a minimal installation, it is enough to have the following:
- Compilers:
gcc
,gfortran
,g++
- Build tools: GNU
make
, GNUm4
,perl
(includingExtUtils::MakeMaker
),ranlib
,git
,tar
,bc
.
- Compilers:
- For a complete installation (recommended), see the linux system packages in this guide
-
Download Sage:
- Open a terminal at the target folder and clone the Sage files there:
git clone https://github.com/bodnalev/sage.git
- Move inside the sage source files with the command
cd sage
- Open a terminal at the target folder and clone the Sage files there:
-
Optional, but highly recommended: Set some environment variables to customize the build.
For example, the
MAKE
environment variable controls whether to run several jobs in parallel. On a machine with 4 processors, say, typingexport MAKE="make -j4"
will configure the build script to perform a parallel compilation of Sage using 4 jobs. On some powerful machines, you might even consider-j16
, as building with more jobs than CPU cores can speed things up further.To reduce the terminal output during the build, type
export V=0
. (V
stands for "verbosity".) -
Configure the build process with the command
make configure
. Then typemake build
. -
Type
./sage
to try it out. In Sage, try for example2 + 2
,plot(x^2)
,plot3d(lambda x, y: x*y, (-1, 1), (-1, 1))
to test a simple computation and plotting in 2D and 3D. Type Ctrl+D orquit
to quit Sage. -
Optional: Create a symlink to the installed
sage
script in a directory in yourPATH
, for example/usr/local
. This will allow you to start Sage by typingsage
from anywhere rather than having to either type the full path or navigate to the Sage directory and type./sage
. This can be done by running:$ sudo ln -s $(./sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
All software included with Sage is copyrighted by the respective authors and released under an open source license that is GPL version 3 or later compatible. See COPYING.txt for more details.
Sources are in unmodified (as far as possible) tarballs in the
upstream/
directory. The remaining description, version
information, patches, and build scripts are in the accompanying
build/pkgs/<packagename>
directory. This directory is
part of the Sage git repository.
Copyright (C) 2005-2024 The Sage Development Team