Versions of SymPy :
- for Maemo 4 Diablo and Maemo 5 Fremantle : v0.7.3 (13/07/2013) is available in their repositories, this is the latest version compatible with Python 2.5;
- for MeeGo 1.2 Harmattan and Sailfish/Mer : v0.7.5 (22/02/2014).

It is strongly suggested to also install IPython for Sailfish, so the interactive use becomes a lot easier.

On Sailfish, IPython has 2 interfaces, IPython terminal and IPython Notebook. The MeeGo Harmattan examples below apply, but there is no icon for IPython on Sailfish.

Installing & using on MeeGo Harmattan

SymPy 0.7.5 has 2 repositories options, so it can be :
- easily installed by using Warehouse / OpenRepos.net. Install Warehouse (OpenRepos.net client) for MeeGo Harmattan, then open Warehouse, search for "SymPy", enable the repository and install;
- installed by using my Harmattan repository.
SymPy 0.7.5 takes about 35 MB after install.

It is strongly suggested to also install IPython for MeeGo Harmattan, so the interactive use of MatPlotLib/NumPy becomes a lot easier
From IPython 0.13.1 Harmattan onwards, there are 3 interfaces to choose :

1)IPython 0.13 terminal interface :1.a) Tap the IPython icon, then :
In [1]: from sympy import *
In [2]: init_printing()
The "init_printing()" is used to show pretty printing outputs.
If you want to use both PyLab (MatPlotLib + NumPy) and SymPy, always load PyLab before SymPy 0.7.3 :
In [1]: %pylab
In [2]: from sympy import *
In [3]: init_printing()1.b) Or in Terminal, type :
$ isympy
or
$ isympy -p ascii
if (a large) output is badly not aligned.
For 1.a and 1.b, if (a large) output is badly not aligned, then use "init_printing(use_unicode=False)".

Click the install icon in Maemo.org Downloads or enable extras repository, search for SymPy in the application manager and install "SymPy interactive shell", it will install IPython (if not installed), SymPy (0.7.1), isympy (X-terminal script with some initialization of variables and output type) and its icon.
To install the new SymPy v0.7.3 for Maemo 5 Fremantle, enable extras-testing or extras-devel repository and search for SymPy in the application manager and install "SymPy interactive shell" 0.7.3. SymPy 0.7.3 about 20 MB after install but it is optified.
To have 3 plotting options on Maemo 5, use SymPy 0.7.2 instead, by downloading :python-sympy_0.7.2-1maemo1_all.deb (2.3 MB)
then installing it with :
$ dpkg -i python-sympy_0.7.2-1maemo1_all.deb

To use SymPy 0.7.x on Maemo 5 :1) the "SymPy" icon or the terminal command "isympy" opens IPython terminal (if installed, or else just X Terminal and Python) and setup SymPy interactive mode;2) If you want to use both PyLab (MatPlotLib 1.0.0 + NumPy 1.4.0) and SymPy.2.a) Tap the IPython icon, then always load PyLab before SymPy :
In [1]: %pylab
In [2]: from sympy import *
In [3]: init_printing()
The "init_printing()" is used to show pretty printing outputs.2.b) Or in Terminal, type :
$ ipython --pylab
then :
In [1]: from sympy import *
In [2]: init_printing()

There are 3 options for making SymPy 0.7.2 plots on Maemo 5 Fremantle, while only the 1st option and 3rd options work with SymPy 0.7.1/0.7.3 :
1) "Plot()" for 2D/3D interactive plots, using PyGlet". See post #11 of this topic for more detailed instructions to use 'Plot()' on Maemo 5.
See also the topic PyGlet for Maemo 5 or the PyGlet for Maemo 5 web page for more details. To install PyGlet on Maemo 5, just open "X terminal" :
$ sudo gainroot
# apt-get update
# apt-get install python-pyglet
Beware that PyGlet takes 6.4 MB (it is optified) after install plus its mesa dependencies use 5.2 MB in root partition.
2) new plotting module, using MatPlotLib. See post #30 for more detailed instructions and examples on Nokia N900. To install it on Maemo 5 takes about 39 MB (which 3 MB not-optified), use the X Terminal with Extras-Devel repository enabled and type :
$ sudo gainroot
# apt-get update
# apt-get install python-matplotlib
Then, as user, create the folder "/home/user/.matplotlib" and the file "/home/user/.matplotlib/matplotlibrc" with the text :
datapath : /usr/share/matplotlib/mpl-data
backend : Qt4Agg
3) mpmath plotting functions, using MatPlotLib. See post #32 for more detailed instructions and examples on Nokia N900. Follow the instructions above to install MatPlotLib.

Click the install icon in Maemo.org Downloads (the description still shows v0.7.1 but it will install v0.7.3) or enable extras repository, search for SymPy in the application manager and install "SymPy Interactive Shell", it will install IPython (if not installed, using 6 MB after install), SymPy 0.7.3, isympy (X-terminal script with some initialization of variables and output type) and its icon.SymPy v0.7.3 (20 MB) and its dependency python2.5-dev (other 15 MB) takes about 35 MB after install.
The SymPy icon or the terminal command "isympy" launches the IPython interactive shell and loads SymPy with some initialization (of variables and output type).

The Maemo 4 and MeeGo Harmattan versions of SymPy do not yet use iPython, instead the simpler Python shell. On Maemo 4 because iPython 0.8 is too old and incompatible with SymPy (isympy script). On MeeGo Harmattan because there is not yet a iPython package available.

Advantages of iPython shell, which is called by isympy or the icon of "SymPy" on Maemo 5 :
- tab (or ctrl+i) completion for objects;
- input history navigation using up and down arrows;
- search input history by typing partial input then up/down arrow to show matching lines, or ctrl+r to have a serch prompt;
- input line n can be retrieved using '_in', 'In[n]', '_ih[n]', and _i, _ii, _iii to access the previous, next previous and next-next previous inputs;
- output line n can be retrieved using '_n', 'Out[n]', '_oh[n]', and _, __, ___ access the previous, next previous and next-next previous outputs;
- information about objects using '?word' or 'word?', full information with '??word' or 'word??';
- magic command system, like '%run file.py', '%pwd';
- run system commands with '!' as prefix, e.g., '!ls".