Using Singular in Jupyter
It is possible to use Jupyter as front-end for Singular. Jupyter notebooks provide a browser based graphical interface to Singular.
These installation instructions are for Ubuntu Linux 16.04 (Xenial).
As an alternative to installing Jupyter and Singular on your System, you can also use it online in SageMathCloud.
Python and Jupyter
If you want to run the Jupyter notebook locally on your computer, you need a recent version of Python 3 and Jupyter installed.
To install Python3 run
apt-get install python3-pip
We recommend using Python3, but you can also use Python2.
To install Jupyter using pip, run
pip3 install jupyter
You need a recent (>= 4.1.0) version of Singular.
Installation instructions for Singular can be found here.
It is important to have a correctly installed Singular and to have a
Singular executable in your
from the Singular installation directory after configuring wth default options and compiling Singular will ensure that the
Singular executable is present in a directory (/usr/local/bin) that is in your
If you are compiling and installing Singular with custom options, make sure both the
Singular executable and
libSingular are available in your system executables and include/library paths.
Jupyter Singular kernel
The Jupyter kernel for Singular consists of two packages. You can install them via pip using
pip3 install PySingular pip3 install jupyter_kernel_singular
While not recommended, it is possible to use the Jupyter kernel for Singular without the
PySingular package. If you have problems to install it, do not worry, it will be fine.
Images using surf
It is possible to display images created by surf in the Jupyter notebooks. For this, you need to download, compile, and install the latest version of surf.
Please configure and compile it via
./configure --disable-gui make make install
For pictures to be displayed in the Notebook, you need to load a specialized Singular library, and a specialized plot command. You can find an example of how to use it here.
Usage and examples
After installing the kernel, you can start a Jupyter Notebook server by running
Now you can create a new notebook with Singular code.