Installation from source is (potentially) very easy, because the distribution contains (essentially) everything on which Sage depends.
http://www.sagemath.org/dist/src/
tar xvf sage-x.y.z.tar
sage-x.y.z
.
cd sage-x.y.z
README.txt
file there.
make
sage-x.y.z
directory.1 This command does the usual steps for each of
the packages, but puts all the results in the local build tree.
This can take close to an hour on some machines.
If successful, you will not see the word ERROR in the last
3-4 lines of output.
After you build Sage, you may optionally copy or move the entire
build tree to /usr/local
. You might also copy the sage-*/sage
script to /usr/local/bin/
and edit ROOT="....."
at the top of that file.
./sage
$ sage ------------------------------------------------------------------- | SAGE Version 0.10.1, Build Date: 2005-12-20-2026 | | Distributed under the terms of the GNU General Public License | | For help type <object>?, <object>??, %magic, or help | ------------------------------------------------------------------- sage:
http://groups.google.com/group/sage-support
.
Please include in your email the file install.log
. It would
also be helpful to include the type of operating system you have and
the version number (and date) of the copy of Sage you are using.
(There are no formal requirements for bug reports - just send them;
we appreciate everything.)
After Sage starts, try a command:
sage: 2 + 2 4
Try something more complicated, which uses the PARI C library:
sage: factor(2005) 5 * 401
Try something simple that uses the Gap, Singular, Maxima and GP/PARI interfaces:
sage: gap('2+2') 4 sage: gp('2+2') 4 sage: maxima('2+2') 4 sage: singular('2+2') 4 sage: pari('2+2') 4
gp
command creates an object in the GP interpreter, and the
pari
command creates an object directly in the PARI C-library.)
Try running Gap, Singular or GP from SAGE:
sage: gap_console() GAP4, Version: 4.4.6 of 02-Sep-2005, x86_64-unknown-linux-gnu-gcc gap> 2+2; 4 [ctrl-d]
sage: gp_console() ... [ctrl-d]
sage: singular_console() SINGULAR / Development A Computer Algebra System for Polynomial Computations / version 3-0-1 0< by: G.-M. Greuel, G. Pfister, H. Schoenemann \ October 2005 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ // ** executing /usr/local/sage/sage-0.8.2/bin/LIB/.singularrc [ctrl-d] > Auf Wiedersehen. sage:
math
, Maple by calling maple
, et cetera. The easiest
way to change this name or perform other customizations is to create
a redirection script in $SAGE_ROOT/local/bin
. SAGE inserts
this directory at the front of your PATH, so your script may need to
use an absolute path to avoid calling itself; also, your script
should use $*
to pass along all of its arguments. For
example, a maple
script might look like:
#!/bin/sh /etc/maple10.2/maple.tty $*
<SAGE_ROOT>/sage
to a location in your PATH.
If you do this, make sure and edit the line with the ....
's
at the top of the sage
script.
sage
containing the lines
#!/bin/bash konsole -T "sage" -e <SAGE_ROOT>/sage
chmod a+x sage
) and
put in your path somewhere. (Note that you have to
change <SAGE_ROOT>
above!) You can also make a
KDE desktop icon with this as the command (under the Application
tab of the Properties of the icon, which you get my right
clicking the mouse on the icon).
echo $PATH
and cp sage <your-path-dir>
into one of these directories,
or else add this bin
directory to your PATH variable,
e.g., if you use the bash shell, add the line
PATH="<sage-home-dir>/bin":$PATH export PATH
sage
at a
shell prompt should start Sage.
./sage -testall
.
This runs most examples in the source code and makes sure that they
run exactly as claimed. To test all examples, use
./sage -testall -optional -long
; this will run examples that
take a long time, and those that depend on optional packages and
software, e.g., Mathematica or Magma. Some (optional) examples will
likely fail because they assume that a database is installed.
spkg/build
contains intermediate
code that is used to build sage. Type make clean
to delete it
and a few other directories (e.g., spkg/archive
and devel/old
).
This is safe and will save you about 500MB disk space.
You may wish to type this periodically.
sage -optional
to see a list or visit
http://www.sagemath.org/packages/optional/,
and sage -i <package name>
to automatically download
and install a given package.
install_scripts
command from
in Sage to create gp, singular, gap, etc., scripts in your
PATH. Type install_scripts?
in Sage for details.
Have fun! Discover some amazing conjectures!
.ipythonrc
directory is created in your HOME
directory if it
doesn't exist.