Octave for Microsoft Windows

Revision as of 02:33, 6 January 2020 by Nrjank (talk | contribs) (→‎Installers for Microsoft Windows: minor zip instruction clarification)
This article is about using pre-built installers of Octave for Windows; for instructions about building it, see Windows Installer.
Info icon.svg
Windows installers are available for the latest version of Octave (9.1.0, released on March 14, 2024) from https://ftp.gnu.org/gnu/octave/windows/.

Users are encouraged to use the latest version unless a specific feature or requirement warrants using an older version of the software. Version specific instructions and installation notes are provided below.

Note: As of version 4.4.1, Octave no longer supports Windows XP. There may be some workarounds to get Octave installed and running in command line mode (see Bug #54662), but maintainers cannot provide support and troubleshooting for this beyond what has already been documented.

Installers for Microsoft Windows

The easiest way to install GNU Octave on Microsoft Windows is by using MXE builds. For the current release, both 32-bit and 64-bit installers and zip archived packages (.zip and .7z formats) can be found at https://ftp.gnu.org/gnu/octave/windows/.

  • For executable installers: the user can simply run the downloaded file and follow the on-screen installation prompts. It is recommended that the installation path does not include spaces or non-ASCII characters. Shortcuts to the program will be created automatically.
  • For the 7z/zip archives:
  1. Extract the file content to a directory on the harddrive (such as C:\Octave). Spaces or non-ASCII characters in the path are discouraged and may cause program errors.
  2. Manually create a shortcut to the octave.vbs file in the main installation directory. (Right-click on the file, select 'Create Shortcut', and move the new shortcut to your desired location.)
  3. If a command-line only instance of Octave is desired, the user can create a shortcut as stated above, right-click on the shortcut, select Properties, and add --no-gui to the end of the Target field.
  4. Run the post-install.bat file before running Octave the first time to reduce plot delays due to the Windows font cache and make the pre-installed packages visible to the system.

Packages

A selection of pre-built, Octave Forge packages are included with for all versions of the official Windows release. If you followed the installation directions above you can confirm the package list by typing the command below at the Octave command prompt:

  >> pkg list

A typical output (for version 9.1.0) is:

Package Name        | Version | Installation directory
--------------------+---------+-----------------------
    communications  |   1.2.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\communications-1.2.1
           control  |   3.1.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\control-3.1.0
    data-smoothing  |   1.3.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\data-smoothing-1.3.0
          database  |   2.4.3 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\database-2.4.3
         dataframe  |   1.2.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\dataframe-1.2.0
             dicom  |   0.2.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\dicom-0.2.1
         financial  |   0.5.3 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\financial-0.5.3
              fits  |   1.0.7 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\fits-1.0.7
fuzzy-logic-toolkit |   0.4.5 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\fuzzy-logic-toolkit-0.4.5
                ga  |  0.10.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\ga-0.10.0
           general  |   2.1.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\general-2.1.0
     generate_html  |   0.3.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\generate_html-0.3.1
          geometry  |   3.0.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\geometry-3.0.0
               gsl  |   2.1.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\gsl-2.1.1
             image  |  2.10.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\image-2.10.0
instrument-control  |   0.3.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\instrument-control-0.3.1
          interval  |   3.2.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\interval-3.2.0
                io  |  2.4.12 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\io-2.4.12
    linear-algebra  |   2.2.2 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\linear-algebra-2.2.2
              lssa  |   0.1.3 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\lssa-0.1.3
             ltfat  |   2.3.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\ltfat-2.3.1
           mapping  |   1.2.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\mapping-1.2.1
     miscellaneous  |   1.2.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\miscellaneous-1.2.1
               nan  |   3.1.4 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\nan-3.1.4
            netcdf  |  1.0.12 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\netcdf-1.0.12
             nurbs  |  1.3.13 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\nurbs-1.3.13
               ocs  |   0.1.5 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\ocs-0.1.5
            odepkg  |   0.8.5 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\odepkg-0.8.5
             optim  |   1.5.3 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\optim-1.5.3
       optiminterp  |   0.3.5 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\optiminterp-0.3.5
        quaternion  |   2.4.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\quaternion-2.4.0
          queueing  |   1.2.6 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\queueing-1.2.6
            signal  |   1.4.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\signal-1.4.0
           sockets  |   1.2.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\sockets-1.2.0
         sparsersb  |   1.0.6 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\sparsersb-1.0.6
           specfun  |   1.1.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\specfun-1.1.0
           splines  |   1.3.2 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\splines-1.3.2
        statistics  |   1.4.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\statistics-1.4.0
               stk  |   2.5.1 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\stk-2.5.1
           strings  |   1.2.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\strings-1.2.0
            struct  |  1.0.15 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\struct-1.0.15
            tisean  |   0.2.3 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\tisean-0.2.3
               tsa  |   4.4.5 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\tsa-4.4.5
             video  |   1.2.4 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\video-1.2.4
           windows  |   1.3.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\windows-1.3.0
            zeromq  |   1.3.0 | C:\Octave\OCTAVE~1.0-W\mingw64\share\octave\packages\zeromq-1.3.0

If Octave was installed from a zip of 7z archive and you did not run the post-install.bat file, you may need to run:

  >> pkg rebuild

All packages can be updated to the latest version by running:

  >> pkg update

Other packages can be installed by running:

  >> pkg install -forge <package name>

To install a new or updated package version manually, the package file can be downloaded from the Octave Forge website to the working directory and can be installed using:

  >> pkg install package_file_name.tar.gz

Detailed instructions for installing individual Octave Forge packages are given at https://octave.sourceforge.io/packages.php.

GNU Octave on cygwin

  • Maintainer: Marco Atzeri
  • Latest release: 2018-08-17
  • Latest packages:
octave-4.4.1-1
Its announce on cygwin mailing list [1]
Octave Forge packages have each a cygwin package.
Its announce on cygwin mailing list [2]
Full cygwin package list is available here [3]
At 2017-04-06, 64 forge packages were available.
  • To install :
run cygwin setup-x86.exe (for cygwin 32 bit) or setup-x86_64.exe (for cygwin 64 bit) and select them in the Math category.
All the package dependencies will be also installed.
Graphics is based on X and to plot you will need to start octave within xterm (or similar).
I recommend to install "xinit", "xlaunch" and "gnuplot". These packages will pull all the functional Xserver.
Otherwise the only graphics will be ASCII art ;-)

Notes for cygwin

  • When building from development source (default branch)
"make check"
passes almost all the tests. Only, and not substantial, failures are:
/pub/hg/octave/src/data.cc : 8 failures due to different handling of complex Inf on sort
/pub/hg/octave/src/syscalls.cc: 1 failure on fork. This disappears when octave is installed
/pub/hg/octave/scripts/sparse/svds.m: 1 failure due to test sensitivity on starting point. See 
https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2011-September/024715.html
  • To build GNU Octave from cygwin source package, you need to install "cygport" and the relevant development libraries
tar -xf octave-4.4.1-1-src.tar.xz 
cygport octave.cygport almostall
see cygport documentation for further info.

General info

Be advised that GNU Octave is primarily developed on GNU/Linux and other POSIX conform systems. The ports of GNU Octave to Microsoft Windows use different approaches to get most of the original Octave and adapt it to Microsoft Windows idiosyncrasies (e.g. dynamic libraries, file paths, permissions, environment variables, GUI system, etc). Bear this in mind and don't panic if you get unexpected results. There are a lot of suggestions on the mailing lists for tuning your Octave installation. GNU Octave standalone ports for Windows are independently compiled using either the MinGW or Microsoft Visual Studio development environments (3.6 or before).

See also