How to install sage on linux

Ubuntu Documentation

«Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.»

«Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.»

Installation Instructions

For most recent versions of Ubuntu, you can install with a PPA using the following commands in a terminal:

Download binaries from their website

Go to the website

and pick up a mirror to download. Choose ‘Download for Linux’, then

  • choose your architecture (32 or 64 bit),
  • then choose the ‘lzma’ package with the word Ubuntu and your Ubuntu version in the name.

For example, for a 32-bit processor running Ubuntu 10.4, you’d select sage-4.4.4-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar.lzma where 4.4.4 is the latest Sage version at the time of writing.

Installing reduces to unpacking into /opt (or any other location of your choice), and putting a link to the sage executable in /usr/local/bin:

Compile from source

You can compile sage from source. Though it’s actually very easy, it may take a long time (1 hour on high end hardware, 14 days on a cell phone).

The first step is to install the required packages:

And you may also need the following for some extra features

Then you can compile the code with:

You can now use sage from that directory or move it into /opt:

You should check their own documentation if you find any trouble: http://sagemath.org/download-source.html

Create an icon in the panel

You can add to the panel an icon for starting the sage server. Just select «add new element to the panel», «add new applet» or however it’s called in your system, then choose for a new «Launcher» or «Launcher for external applications».

In the configuration dialog for the launcher, make sure you select «open in a terminal» and choose «sage -notebook» for the command in GNOME or XFCE. In KDE, choose «sage» for the command and «-notebook» for command line options.

You can use «SAGE» for the name and the following for the icon:

where «sage-directory. » is the directory where you installed sage.

Getting Started With Sage

Open a terminal and type sage and press enter. The sage command line interface should start up. Wait for the sage prompt to come up. It would looks thus:

This may take up to a minute depending on your hardware.

The first time you use Sage you will be asked to set a password to secure your work.

Choice of Sage Interface: Command Line Or GUI

You have a choice of using Sage either from the command line or from a GUI. The official GUI is called the notebook. In order to use the notebook interface to sage use the sage prompt to type:

This will open the Firefox web browser showing the notebook.

To start work with the notebook click on the link New Worksheet.

The rest involves typing your sage commands into the input box and clicking the evaluate button that lies below it.

You might also use the program Cantor or TeXmacs as an interface, though they’re not as popular as the notebook:

Help and Documentation

A beginner would probably start with the Tutorial at http://www.sagemath.org/doc/tutorial/index.html

Further Reading

At the web page http://www.sagemath.org/help.html you would, by and by, want to look at the Installation Guide and the Reference Manual besides a whole host of documentation at http://www.sagemath.org/doc .

Comments

Hao Wen: 2009-12-01

While Sage is truly a powerful software, it still lacks some key features as of today (Dec. 1, 2009). Good news it is under development.

Plotting doesn’t have a good label function. Axis can not be fine tuned as Matlab.

Pablo Angulo: 2010-06-15

Hao, that’s perfectly possible, and it’s been so for a long time. Sage uses matplotlib for most graphics and you can even add labels in latex. Feel free to email sage-support for these kind of questions.

On Lucid I had to add the libgfortran library:

apt-get install libgfortran3

..to get rid of this sage error: ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory.

SAGE (последним исправлял пользователь edgimar 2013-07-20 18:05:34)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Install from Pre-built Binaries¶

Installation from a pre-built binary tarball is an easy and fast way to install Sage. Note that on GNU/Linux a preferred way is to use your package manager (e.g. apt, pacman, yum).

In all cases, we assume that you have a computer with at least 4 GB of free disk space.

Download Guide¶

Not sure what to download? Just follow these steps.

Determine your operating system (Windows, Linux or macOS).

According to your operating system, go to the appropriate Download section of the SageMath website.

Choose a download server (aka mirror) that is close to your location.

Download the binary that is appropriate to your system. Depending on your operating system you might need additional information such as your CPU type (e.g. 64 bits or 32 bits) and your operating system version. If you use macOS you will have the choice between a tarball (whose names ends with tar.bz2 ) and two kinds of mountable disk images (whose names end with app.dmg and simply .dmg ). Except for Windows, the naming scheme of the files is always sage-VERSION-OS-CPU.EXTENSION where EXTENSION can be tar.gz , tar.bz2 , dmg or app.dmg .

Then choose the appropriate section below corresponding to your situation.

Linux¶

Make sure that you have an SSL library installed (OpenSSL recommended).

It is highly recommended that you have LaTeX installed. If you want to view animations, you should install either ImageMagick or ffmpeg. ImageMagick or dvipng is also used for displaying some LaTeX output in the notebooks.

Choose an appropriate directory where to install Sage. If you have administrator rights on your computer a good choice is /opt otherwise it can be anywhere in your home directory. Avoid spaces and Unicode characters in the path name.

Next, download the latest binary tarball available (see “Download Guide” above). The tarball name should end with .tar.gz or .tar.bz2 . If you want to use the .dmg or .app.dmg for macOS switch to the next section.

Unpack the tarball where you intend to install Sage. This is done from the command line using the tar program. Next, to launch Sage, go to the SageMath directory and run the program that is called sage (via ./sage on the command line).

The first time you run Sage, you will see a message like

At this point, you can no longer move your Sage installation and expect Sage to function.

Once you are able to launch Sage you might want to create a shortcut so that sage just works from the command line. To do so simply use the ln program from the command line:

where /path/to/SageMath/sage is the actual path to your SageMath installation.

macOS¶

On macOS there are two possible binaries for each version. They can be recognized by their suffixes, but their actual contents are identical.

tar.bz2 : a binary tarball

dmg : a compressed image of the binary

This section explains how to install from dmg . For the installation of the binary tarball tar.bz2 just follow the steps of the Linux installation.

After downloading the file, double click on the dmg file to mount it, which will take some time. Then drag the folder SageMath that just appeared to /Applications/ . You might want to have shortcuts so that sage in the console simply works out of the box. For that purpose, follows the steps at the end of the section “Linux”.

Alternative macOS binaries are available here. These have been signed and notarized, eliminating various errors caused by Apple’s gatekeeper antimalware protections.

Microsoft Windows (Cygwin)¶

SageMath on Windows requires a 64-bit Windows (which is likely to be the case on a modern computer). If you happen to have a 32-bit Windows, you can consider the alternatives mentioned at the end of Welcome to the SageMath Installation Guide .

To install SageMath on Windows, just download the installer (see the above “Download Guide” section) and run it.

Источник

Как установить Sage на Ubuntu?

Команда apt get по вашей ссылке ничего не находит.

И что это за инструкция по размещению ссылки на «исполняемый файл sage в / usr / local / bin»

Так что в моей текущей структуре папок я нахожу,

Это «исполняемый файл мудреца»?

Догадываясь так, я сделал это (согласно ссылке выше)

Но затем выполнение выше приведёт к ссылке в / usr / local / bin, которая называется «sage».

Но эта ссылка не работает.

(подпапка «sage» рабочего стола — это то, что я создал, в которую я разархивировал файл, который я скачал с зеркала — загруженная папка называлась под этим именем, «sage-6.4-x86_64-Linux» и ее подпапки — вот что это все равно пришло с)

Что я делаю не так?

2 ответа

Там нет никакого способа, чтобы понять это неправильно, вам нечего пропустить, но здесь есть некоторые идеи каждого шага:

это добавляет APT в ваш репозиторий, другими словами, добавляет это местоположение для поиска APT при попытке установить новые пакеты. Он должен запросить какое-то подтверждение относительно ключа GPU, принять его, и он добавит его.

Это обновляет ваш локальный список пакетов, перезагружая каждый список пакетов, который у вас есть, все значения по умолчанию в Ubuntu, а также списки мудрецов

Это тот, кто действительно устанавливает шалфей. Что случилось?

Чтобы sage работал в bash, вам нужно установить realpath:

Предполагая, что ваша ссылка на исполняемый файл и /usr/local/bin находится в переменной PATH, вы можете запустить sage, просто набрав sage в терминале.

Источник

Welcome to the SageMath Installation Guide¶

You can install SageMath either from a package manager, a pre-built binary tarball or from its sources.

Installing SageMath from your distribution package manager is the preferred and fastest solution (dependencies will be automatically taken care of and SageMath will be using your system Python). It is the case at least for the following GNU/Linux distributions: Debian version >= 9, Ubuntu version >= 18.04, Arch Linux, and NixOS. If you are in this situation, see Linux package managers .

If your operating system does not provide SageMath, you can also use a pre-built binary. See the section Install from Pre-built Binaries .

Or you could install the sage package from the conda-forge project. See the section Install from conda-forge .

By compiling SageMath from its sources you might be able to run a slightly more up-to-date version. You can also modify it and contribute back to the project. Compiling SageMath might take up to 4 hours on a recent computer. To build SageMath from source, go to the section Install from Source Code .

Note that there are other alternatives to use SageMath that completely avoid installing it:

the Sage Debian Live USB key: a full featured USB key that contains a whole Linux distribution including SageMath. This might be an option if you fail installing SageMath on your operating system.

CoCalc: an online service that provides SageMath and many other tools.

Sage Cell Server: an online service for elementary SageMath computations.

Docker images: SageMath in a container for more experienced users.

The rest of this document describes how to install SageMath from pre-built binaries and from sources.

Источник

Future is here!

Future is here!

Install SageMath in Ubuntu 20.04 LTS

SageMath is a free and open-source application available through GPLv3 license. The application was first released on February 24, 2005. Furthermore, it combines the functionality of numerous open-source packages for study and research on different branches of Mathematics. At the time of writing, the latest stable release of SageMath is 9.0. In this article, we would discuss how to install SageMath in Ubuntu 20.04 LTS release.

The application is written in Python and Cython. And, William A. Stein is its lead developer.

Note: Following operations would require you to have superuser privileges. In case you don’t have one, then contact your System Administrator for assistance.

Install SageMath in Ubuntu 20.04 LTS

Since the package is already available through standard Ubuntu repository. Therefore, first update the repository. It will help us get the latest version of the package available. Hence, issue the following in terminal –

To install SageMath

It will install all the necessary dependencies. Now, we can access SageMath either through our Systems’ main menu or from terminal (type sage).

Sage Jupyter Notebook server will start upon launching the applications’ GUI, whereas if we try to access it from terminal – SageMath will start from the terminal itself.

In conclusion, we have discussed how to install SageMath in Ubuntu 20.04 LTS release.

Additional Info –

At the beginning, we talked of SageMath being used to work on various problems related to Mathematics. We will illustrate how we can solve simple mathematical problems through SageMaths’ Command-line interface –

Problem 1: Solve equations with two variables –

It will return with the output –

Problem 2:

Problem 3: To plot graphs –

It will show us the output through ImageMagick application.

Though we just introduced you to solve the most basic Mathematical problems through SageMath. But, it can do much more. It would not be possible for us to cover them all in just few articles. We will come up with more comprehensive ones some time soon.

Источник

Читайте также:  Отображать содержимое папки windows
Оцените статью