diff --git a/README.rst b/README.rst index 99d2fce..7adb74f 100644 --- a/README.rst +++ b/README.rst @@ -22,10 +22,10 @@ To install using conda:: conda install octave_kernel conda install texinfo # For the inline documentation (shift-tab) to appear. -We require the ``octave`` executable to run the kernel. +We require the ``octave-cli`` or ``octave`` executable to run the kernel. Add that executable's directory to the ``PATH`` environment variable or create the environment variable ``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"``. +Note that on Octave 5+ on Windows, the executable is in ``"Octave-x.x.x.x\mingw64\bin"``. We automatically install a Jupyter kernelspec when installing the python package. This location can be found using ``jupyter kernelspec list``. diff --git a/octave_kernel/kernel.py b/octave_kernel/kernel.py index fb80b31..0adbbe0 100644 --- a/octave_kernel/kernel.py +++ b/octave_kernel/kernel.py @@ -481,9 +481,11 @@ def _get_executable(self): if 'octave' not in executable: raise OSError('OCTAVE_EXECUTABLE does not point to an octave file, please see README') else: - executable = which('octave') + executable = which('octave-cli') if not executable: - raise OSError('octave not found, please see README') + executable = which('octave') + if not executable: + raise OSError('octave not found, please see README') return executable.replace(os.path.sep, '/') def _cleanup(self):