-
Download octave.
-
Install octave, and write down the installation destination path.
C:\Program Files\octave-7.3.0-w64
-
From the installation destination path, find the octave client path, that is the path to
octave-cli.exe
undermingw64\bin\
folder. Copy the path.C:\Program Files\octave-7.3.0-w64\mingw64\bin\octave-cli.exe
-
Open Environment Variable. You can access it by pressing Windows-Key, type
edit the system environment variables
, and press Enter to search. -
Click
Environment Variables
. -
Under
System variables
, clickNew...
. -
Fill the
Variable name
withOCTAVE_EXECUTABLE
, andVariable value
with the octave client path.Variable name:
OCTAVE_EXECUTABLE
Variable value:
C:\Program Files\octave-7.3.0-w64\mingw64\bin\octave-cli.exe
-
Restart (not shutdown, but restart) the computer to make
os.environ
recognize the new path.
-
Install
oct2py
from python PyPI using a command prompt.pip install oct2py
-
Check
octave
andoct2py
installation by running the below python code.from oct2py import octave octave.path()