Skip to main content

A Jupyter kernel for Octave.

Project description

Prerequisites

Jupyter Notebook and GNU Octave.

It is recommended to also install gnuplot for Octave to enable inline plotting.

Installation

To install using pip:

pip install octave_kernel

Add --user to install in the user-level environment instead of the system environment.

To install using conda:

conda config --add channels conda-forge
conda install octave_kernel
conda install texinfo # For the inline documentation (shift-tab) to appear.

We require the octave-cli executable to run the kernel. Add that executable’s directory to the PATH environment variable or use the OCTAVE_EXECUTABLE to point to the executable itself. Note that on Octave 5 on Windows, the executable is in "Octave-5.x.x.x\mingw64\bin".

Usage

To use the kernel, run one of:

jupyter notebook  # or ``jupyter lab``, if available
# In the notebook interface, select Octave from the 'New' menu
jupyter qtconsole --kernel octave
jupyter console --kernel octave

This kernel is based on MetaKernel, which means it features a standard set of magics (such as %%html). For a full list of magics, run %lsmagic in a cell.

A sample notebook is available online.

Troubleshooting

Kernel Times Out While Starting

If the kernel does not start, run the following command from a terminal:

python -m octave_kernel.check

This can help diagnose problems with setting up integration with Octave. If in doubt, create an issue with the output of that command.

Kernel is Not Listed

If the kernel is not listed as an available kernel, first try the following command:

python -m octave_kernel install --user

If the kernel is still not listed, verify that the following point to the same version of python:

 which python  # use "where" if using cmd.exe
which jupyter

Advanced Configuration

We automatically install a Jupyter kernelspec when installing the python package. This location can be found using jupyter kernelspec list. If the default location is not desired, remove the directory for the octave kernel, and install using python -m octave_kernel install. See python -m octave_kernel install --help for available options.

The path to the Octave kernel JSON file can be specified by creating an

OCTAVE_KERNEL_JSON environment variable.

The command line options to Octave can be specified with an OCTAVE_CLI_OPTIONS environment variable. The will be appended to the default opions of --interactive --quiet --no-init-file. Note that the init file is explicitly called after the kernel has set more off to prevent a lockup when the pager is invoked in ~/.octaverc.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

octave_kernel-0.29.1.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

octave_kernel-0.29.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file octave_kernel-0.29.1.tar.gz.

File metadata

  • Download URL: octave_kernel-0.29.1.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for octave_kernel-0.29.1.tar.gz
Algorithm Hash digest
SHA256 27da0695b396cc36bbbbd340fe5860c1320c2c87cc7426d3afa248ee100d79ed
MD5 43a0eac8027b967d8725423d6ebb3066
BLAKE2b-256 8f66fcf48f0710c3cc3ec1931d907344fef674e510c065d8205ce2206b8e774f

See more details on using hashes here.

File details

Details for the file octave_kernel-0.29.1-py3-none-any.whl.

File metadata

  • Download URL: octave_kernel-0.29.1-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for octave_kernel-0.29.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd824fabd7c16d91bf2f5af711973e51e2018b9cc41bbb931bc31fe3afc5cefd
MD5 bf0340bc024d14cf27fe04f9326ae557
BLAKE2b-256 001a4f0c10dbb60e8ad27f4d3c798a3707ac790159d41906df132678b8676260

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