Skip to main content

Jupyter Notebook integration for Mathics3

Project description

Mathics3 Jupyter Kernel

This provides a Jupyter Kernel for running Mathics3. In contrast to code in Mathics3-Frontend-notebooks, this is a full Kernel rather than an extension to be loaded on top of Python 3 ipykernel.

Using

After the Mathics3 Jupyter kernel is loaded, you can enter Mathics3 commands, and you will get the results evaluated and displayed.

There are two "magic" commands available, %pip and %python.

%pip

The %pip command allows you to run Python "pip" commands or to see information on installed Python packages.

%python or %py

The %python command allows you to run Python statements or evaluate Python expressions, rather than Mathics3 expressions or statements.

A special variable session is defined so that you have access to the underlying Python session.

Building

Install all of the prerequisites:

$ pip install -e .

Register the Mathics3 kernel for Jupyter via the JSON file mathics3-jupyter/kernel.json.

$ python3 -m mathics3_jupyter_kernel.install

This needs to be done only once.

To see that this has been installed, run:

$ jupyter kernelspec list
%load_ext mathics3_kernel.frontend.jupyter

Usage is as simple as executing the above code in a notebook cell, and then Mathics3 code can be directly run in all subsequent cells. Here is a sample notebook that can be used with a local Jupyter installation.

Running

$ jupyter lab  # or:  make lab

Debugging

Install jupyter-console and run jupyter console via make:

$ make console
jupyter console --kernel=mathics3-jupyter
Jupyter console 6.6.3

Mathics3 10.0.2dev0 Kernel (1.0)- A Mathematica-compatible engine
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathics3_jupyter_kernel-0.9.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mathics3_jupyter_kernel-0.9.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file mathics3_jupyter_kernel-0.9.0.tar.gz.

File metadata

  • Download URL: mathics3_jupyter_kernel-0.9.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for mathics3_jupyter_kernel-0.9.0.tar.gz
Algorithm Hash digest
SHA256 786e6bc1260e13cbfa92b78f111514265eb2495cff73b6b952d8fefaf63bdda2
MD5 cb4cae9f741ff0a87691ec3ecc9996f4
BLAKE2b-256 6ce51ddccf4ab1d7a131f1317843aa1d2c1b5568cab0bab1a23b4a7da0be205a

See more details on using hashes here.

File details

Details for the file mathics3_jupyter_kernel-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mathics3_jupyter_kernel-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cab5e47ddb1faa351b802270ba269e75f6c654ba35ee5e84ee3196238387d6c
MD5 1353bcd5f077572e18bb606ff259a666
BLAKE2b-256 b4e299f977b1ff42b2863a93d8ec92f313f79a7f90dac75da892cc1a5fca0466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page