Sagemath



  1. Online Sagemath
  2. Sagemath Vs Mathematica
  3. Sagemathcell
  4. Sagemath Online
  5. Sagemath Python

SageMath is mathematical software with features covering many aspects of mathematics, including algebra, combinatorics, numerical mathematics, number theory, and calculus.

Screenshot from SageMath

SageMath was reviewed by Mihaela Olteanu Sage is a free mathematical computing software that combines the power of many free tools such as GAP, Maxima, PARI and various scientific libraries, to which it adds thousands of new functions in a common interface and is written in the Python programming language. I haven't had a chance to look at the algorithm yet, but I browsed through the code in the patch and there a couple things. 1) Instead of adding.n.patch for each new version, unless the new version is drastically different simply replace the previous patch with the new one. To run SageMath on Microsoft Windows there are two options: For SageMath 8.0 and up a native binary installer is now available. To use the installer you will need: A 64-bit version of Windows 7 or up; there is not currently a 32-bit build. Roughly 5 GB of free disk space (plus 1 GB for the installer file itself) Read these additional instructions. This is a mirror of SageMath - Open Source Mathematics Software. Here, you can download SageMath for your system and platform. Not sure what to download? Then follow the download guide. For more information, visit the SageMath website.

Installation

SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay sage-on-gentoo is required, together with dependencies found in the overlay science.

Gentoo users will be familiar with the science overlay from Gentoo's Science Project (https://wiki.gentoo.org/wiki/Project:Science).

Install Required Overlays

Using layman

The easiest (fastest) method of installing the required overlays is via the package layman (app-portage/layman). Make sure layman is installed with USE=git and correctly configured. You may find a guide for layman at: http://www.gentoo.org/proj/en/overlays/userguide.xml

Update your layman list:

Add the two overlays to Funtoo. Firstly is the science overlay (if not already installed):

Finally, add the SageMath overlay:

Sagemathcloud

(Alternative) Using Portage Repositories

Users may add the science and sage-on-gentoo overlays as repositories in portage without the need for layman. Both overlays are available via https://github.com and portage is able to sync with them.

If not already present, first create a location for portage to store a local clone of the overlays.

SagemathSagemath.org

Before configuring portage we will manually clone the two repositories into this local folder using dev-vcs/git. Starting with science for SageMath dependencies

and then sage-on-gentoo for the actual SageMath ebuilds

The final step is to configure portage to be able to use these additional repositories. This is achieved by adding appropriate configuration settings to files saved within /etc/portage/repos.conf/. (More information on repositories can be found by reading man portage).

Using your favorite text editor, create and save the following file in /etc/portage/repos.conf/ for the science repository.

Now repeat the previous step for a second file in /etc/portage/repos.conf/ corresponding to the sage-on-gentoo repository.

The sage-on-gentoo repository has the repo_name 'sage-on-gentoo'. Setting the name in this .conf file to something else (e.g. '[sagemath]') will cause portage to complain.

If these previous steps are successful, portage will be able to access and update ebuilds within these two repositories. Initiate these repositories by simply running

Apply Required package.use and package.unmask Settings

This section favors /etc/portage/package.use and /etc/portage/package.unmask being directories instead of files which is a common case. Portage allows these to be directories and will processes the files contained within as if one single package.use or package.unmask file.

Before users must manually unmask dependencies and apply per-package USE flags required by SageMath. Fortunately the required settings are available in ready-made files shipped with the sage-on-gentoo overlay. Three files are required:

  • sage-on-gentoo/package.unmask/sage
  • sage-on-gentoo/package.use/sage
  • sage-on-gentoo/package.use/sage-unstable

To use these files permanently, we will create symbolic links within /etc/portage/. Updates made to these files within the sage-on-gentoo overlay will transfer to your system with each emerge --sync.

The default directory for layman overlays, if not set manually, is /var/lib/layman. If a portage repository was used instead of layman, use the appropriate /path/to/local-repo. For the layman example we will create a symbolic links for the package.unmask file:

Similarly create a symbolic link for each of the two package.use files:

Installing SageMath

Please, note that this will pull in a lot of dependencies. If you can not proceed with this step (because of circular dependencies, missing USE-flags, and so on), report this behavior.

Testing your SageMath install

From the console:

You will be asked to create password for SageMath's 'admin' account.

Online Sagemath

If successful, the command notebook() should launch the SageMath notebook in a new browser session (assuming that you are running X).The command quit() will exit SageMath.

Troubleshooting

USE flags

When attempting to merge SageMath, portage is likely to indicate that certain packages require per-package USE flags to be set.

Read each message carefully. When appling per-package USE flags, save these to a file inside of /etc/portage/package.use/ that is other than the two files that are symbolic links since changes could be overwritten with each overlay sync.

Sagemath Vs Mathematica

For example, add per-package use settings to a file /etc/portage/package.use/my-package-use.

Circular Dependencies when installing

This is an example of a circular dependency encountered when attempting to merge SageMath

Sagemathcell

The issue here is with dev-python/ipython. A successful workaround is to first merge it separately with the 'notebook' USE flag disabled.

Sagemath Online

Now continue with the install of SageMath

Sagemath Python

Retrieved from 'https://www.funtoo.org/index.php?title=SageMath&oldid=18662'