# Revision history [back]

Similar to above, the following worked for me from the notebook interface of sage:

os.environ["PATH"]+=":/opt/local/bin"


Octave was installed on my system using MacPorts.

I found that octave.eval('2+2') worked immediately in the notebook, but octave(2+2), required:

octave = Octave()
octave._start()


otherwise it errored with "ValueError: The octave session in which this object was defined is no longer running."

Note: octave.eval returns a string, usually with "ans =", whereas octave() returns a number that I could perform further operations on.

You may want to put octave.quit(True) at the end. I don't understand what is actually going on well, so take my advice with caution.