User Tools

Site Tools


blog:installing_sage_on_ubuntu_11.10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blog:installing_sage_on_ubuntu_11.10 [2012-01-22 09:51] brbblog:installing_sage_on_ubuntu_11.10 [2012-02-13 18:37] (current) – [Finishing up the installation] brb
Line 1: Line 1:
-====== Installing sage on ubuntu 11.10 ======+====== Installing sage on ubuntu ====== 
 + 
 +Sage is a very powerful computer algebra systemEspecially nice is the LaTeX integration using sagetex. Here's how to set this up: 
 + 
 +====Compile yourself =====
  
 Install prerequisite libraries Install prerequisite libraries
   sudo apt-get install build-essential m4 readline-common libreadline-dev texlive xpdf evince tk8.5-dev gfortran   sudo apt-get install build-essential m4 readline-common libreadline-dev texlive xpdf evince tk8.5-dev gfortran
  
-Download the current version of the sources  +Download the current version of the sources and compile them
   wget http://mirror.switch.ch/mirror/sagemath/src/sage-4.8.tar   wget http://mirror.switch.ch/mirror/sagemath/src/sage-4.8.tar
 +  tar xvf sage-4.8.tar
 + 
 +===== Download pre-build =====
 +
 +Download the file for you platform from here http://www.sagemath.org/download-linux.html
 +
 +Unpack/move the build or downloaded files to /opt, this gives you a directory /opt/sage-4.xy...
 +
 +===== Finishing up the installation =====
 +
 +Make a symolic link to this directory:
 +  sudo ln -s /opt/sage-4.... /opt/sage
 +
 +Change the ownership of the files to root
 +  sudo chown root:root /opt/sage/* -R
 +  
 +Run sage as root for the first time to update some paths which are absolute
 +  cd /opt/sage-4....
 +  sudo sage
 +  
 +After that, you should be able to run sage as a normal user
 +  sage
 +  sage: 2+2
 +  4
 +  sage:
 +  
 +If you get errors when starting up, then probably the first start as root has created some files in the directory ~./sage which now belong to root instead of you (USER)
 +<code>
 +cd .sage 
 +sudo chown $USER:$USER * -R
 +sage
 +</code>
 +Should now work.
 +
 +=====
 + Setting up sagetex for LaTeX =====
 +
 +If you use LaTeX and want to integrate sage into your latex files (which gives you all the power of sage/maxima/maple/... directly inside you LaTeX file!):
 +<code>
 +  mkdir ~/texmf
 +  ln -s /opt/sage/local/share/texmf/tex/generic/sagetex/ ~/textmf/sagetex
 +  sudo texhash
 +</code>
 +
 +Now you have the sagetex.sty file from the sage installation available. If you run texlive, it's a good idea to hunt down and rename the outdated sagetex.sty file which probably hangs around:
 +  cd /usr/share/texmf-texlive/tex/latex/sagetex
 +  ls
 +  sudo mv sagetex.sty sagetex.sty.off
 +  sudo texhash
 +  
 +To get started with sagetex read this guide: http://www.sagemath.org/doc/tutorial/sagetex.html
 +  
  
  
blog/installing_sage_on_ubuntu_11.10.1327222298.txt.gz · Last modified: 2012-01-22 09:51 by brb