Octave for Microsoft Windows: Difference between revisions

Jump to navigation Jump to search
m
(38 intermediate revisions by 7 users not shown)
Line 1: Line 1:
GNU Octave is primarily developed on GNU/Linux and other [https://en.wikipedia.org/wiki/POSIX 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 [http://mingw.org MinGW] or Microsoft Visual Studio development environments (3.6 or before).
:''This article is about using pre-built installers of Octave for Windows; for instructions about building it, see [[Windows Installer]].''
 
The most recent Windows installers are available from [https://ftp.gnu.org/gnu/octave/windows/ 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.
 
Be advised that GNU Octave is primarily developed on GNU/Linux and other [https://en.wikipedia.org/wiki/POSIX 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 [http://mingw.org MinGW] or Microsoft Visual Studio development environments (3.6 or before).


__TOC__
__TOC__
Line 5: Line 10:
= Installers for Microsoft Windows =
= Installers for Microsoft Windows =


===Octave-4.0.0 ===
===Octave-4.2.1===
The easiest way to install GNU Octave on Microsoft Windows is using [http://hg.octave.org/mxe-octave/ MXE] builds. For the current 4.2.1 release both 32-bit and 64-bit installers and zip archived packages can be found at [https://ftp.gnu.org/gnu/octave/windows/ ftp.gnu.org/gnu/octave/windows/].
 
For executable installers the user can simply run the downloaded file and follow the onscreen installation prompts.  It is recommended that the installation path not include spaces or non-ASCII characters. Shortcuts to the program will be automatically created.
 
For the zip-file archives, the user should extract the file content to a directory on the harddrive (such as C:\Octave). Manual shortcuts can then be created to either the octave.bat or octave.vbs files in the main installation directory.
 
====Packages====
A selection of pre-built octave-forge packages are prepared for all versions of the official release. If you installed Octave using the executable installer you can confirm the package list by typing the command below from the Octave command prompt:
 
  >> pkg list


The easiest way to install GNU Octave on Microsoft Windows is using [http://hg.octave.org/mxe-octave/ MXE] builds. For the current 4.0.0 release installers can be found at [https://ftp.gnu.org/gnu/octave/windows/ ftp.gnu.org].
If you instead installed Octave from the .zip archive, you need to first rebuild the package list on your local machine. (The command above will produce a blank output and packages will be inaccessible before rebuilding.) Do this by typing the following command:


Known issues specific to windows version 4.0.0.
  >> pkg rebuild
#Both cli and gui cannot handle path name of which contains non-ascii characters. (For 3.8, cli can handle non-ascii code if codepage is properly set to the machine locale)
#Both cli and gui cannot represent non-ascii characters on screen (cli) or command window (gui).  (For 3.8, cli can handle non-ascii code if codepage is properly set to the machine locale)


See [[Windows_Installer]] for building instructions.
Packages can be updated by running
 
  >> pkg update


====Packages====
Other packages can be installed by running
Pre-build octave-forge packages are not prepared from octave-3.8 or later for windows. You can install some octave-forge packages using archived sources and build script. However, small flaws exist in current octave-4.0.0_0 distribution. Before install, correct version number of general and signal packages version to 2.0.0 and 1.3.2, respectively and comment out install io package as "#try_install io-2.2.7.tar.gz" in C:\octave\octave-4.0.0\src\build_packages.m". Then execute


    >> cd C:\octave\octave-4.0.0\src
  >> pkg install -forge <package name>
    >> build_packages
    >> pkg install -forge io


Other octave-forge packages may be installed by
To manually install a new or updated package version, the package file can be downloaded from the [https://octave.sourceforge.io/packages.php Octave-Forge website]to the working directory and can be installed using:


   >> pkg install -forge (package name)
   >> pkg install package_file_name.tar.gz


For detailed instruction of installing Octave-Forge packages is shown at [http://wiki.octave.org/Octave-Forge Octave-Forge]
For detailed instruction of installing Octave-Forge packages is shown at [http://wiki.octave.org/Octave-Forge Octave-Forge]


== Octave 4.0.0 on cygwin==
 
''Note that a security related issue in Windows XP currently prevents Octave from automatically retrieving packages from the website for installation or updates when running under that Operating System, and manual package installation is necessary to update or install new packages.''
 
== Octave 4.2.1 on cygwin==


*'''Web-Site:''' http://cygwin.com  
*'''Web-Site:''' http://cygwin.com  
*'''Maintainer:''' Marco Atzeri  
*'''Maintainer:''' Marco Atzeri  
*'''Latest release:''' 2015-06-21
*'''Latest release:''' 2017-04-06


*Latest packages:
*Latest packages:


:octave-4.0.0-1
:octave-4.2.1-1
:Its announce on cygwin mailing list [http://www.cygwin.com/ml/cygwin-announce/2015-06/]
:Its announce on cygwin mailing list [https://cygwin.com/ml/cygwin-announce/2017-04/msg00017.html]


:octave-forge packages have each  a cygwin package
:octave-forge packages have each  a cygwin package
:Its announce on cygwin mailing list [http://cygwin.com/ml/cygwin-announce/2015-06/]
:Its announce on cygwin mailing list [https://cygwin.com/ml/cygwin-announce/2017-01/msg00078.html]
: Full cygwin package list is available here [https://cygwin.com/packages/]
: Full cygwin package list is available here [https://cygwin.com/packages/]
: At today 2015-06-21, 57 forge packages are available.  
: At today 2017-04-06, 64 forge packages are available.  


*To install :  
*To install :  
Line 65: Line 80:
*To build from cygwin source package, you need to install "cygport" and the relevant development libraries
*To build from cygwin source package, you need to install "cygport" and the relevant development libraries
     <nowiki>
     <nowiki>
     $ tar -xvjf octave-4.0.0-1-src.tar.bz2
     $ tar -xf octave-4.2.0-1-src.tar.xz
     $ cygport octave.cygport almostall</nowiki>
     $ cygport octave.cygport almostall</nowiki>


:see cygport documentation for further info.
:see cygport documentation for further info.


=Older instructions=
=Older version instructions=
''Note that the instructions below may contain outdated links or instructions that are no longer relevant to current versions''
 
==Older MXE builds==
 
===Octave-4.2.0===
 
The instructions for Octave 4.2.0 are the same as for Octave 4.2.1 above. However, note that version 4.2.0 has a bug that prevents it from automatically retrieving packages from the [https://octave.sourceforge.io/packages.php Octave-Forge website] for installation or updates. Manual package installation is necessary with this version to update or install new packages on Windows.
 
To manually install a new or updated package version, the package file can be downloaded from the [https://octave.sourceforge.io/packages.php Octave-Forge website] to the working directory and can be installed using:
 
  >> pkg install package_file_name.tar.gz
 
Detailed instruction of installing Octave-Forge packages is shown at [http://wiki.octave.org/Octave-Forge Octave-Forge]
 
===Octave-4.0.3===
 
The easiest way to install GNU Octave on Microsoft Windows is using [http://hg.octave.org/mxe-octave/ MXE] builds. For the current 4.0. release installers and zip archived packages can be found at [https://ftp.gnu.org/gnu/octave/windows/ ftp.gnu.org/gnu/octave/windows/]. Unofficial 64 bit binary is available at "[http://www.tatsuromatsuoka.com/octave/Eng/Win/ File list of Octave for Windows]".
 
Known issue specific to windows version 4.0
#Both cli and gui cannot handle path name of which contains non-ascii characters. (For 3.8, cli can handle non-ascii code if codepage is properly set to the machine locale)
#nan package cannot be installed by "pkg install" commands. Workaround is to execute "setenv CC gcc" before "pkg install".
 
Known issue of octave starup
# octave sometimes will fail to startup because of internal troubles. On such occasion, please try to delete .config\octave folder by which USERPROFILE environmental variable points. (One of the way to see value of USERPROFILE, startup command prompt and type "set")
 
====Packages====
Pre-built octave-forge packages are prepared for official release. If you installed Octave 4.0.3 using the executable installer you can confirm the package list by typing the command below from the Octave command prompt:
 
  >> pkg list
 
If you instead installed Octave from the .zip archive, you need to first rebuild the package list on your local machine. (The command above will produce a blank output.) Do this by typing the following command:
 
  >> pkg rebuild
 
 
Other packages can be installed by
 
  >> pkg install -forge <package name>
 
For detailed instruction of installing Octave-Forge packages is shown at [http://wiki.octave.org/Octave-Forge Octave-Forge]
 
For 64 bit binary distributed from the unofficial site, pre-built package are not prepared.
Please follow the instruction on the distribution page.
 
====gnuplot====
Current octave for windows ships a not full featured gnuplot. Therefore you cannot use the full features of gnuplot graphics toolkit 
(e.g. cannot use cairo based devise like "-dpdfcairo"). If you want use it, please use the following instruction
 
Download and install gnuplot if you do not have it. You can find the windows installer in the "[https://sourceforge.net/projects/gnuplot/files/gnuplot/ gnuplot web site for Files section]" The latest version is 5.0.3.
 
We can find path of USERPROFILE directory by
  >> getenv USERPROFILE
make an .octaverc file in USERPROFILE directory by your favorite text editor and set gnuplot_binary e.g.


==MinGW ports==
  gnuplot_binary 'C:\Program Files (x86)\gnuplot\bin\gnuplot.exe'
 
Please do not forget to quote the path name by single quote (') if name of which has (a) white space(s).
gnuplot ver. 5 supports windows, wxt and qt terminal. On octave, windows terminal is default.
If you want change it to wxt terminal, execute
 
>> setenv GNUTERM wxt
 
You can of course describe it in .octaverc.
 
==Older MinGW ports==
 
===Octave-4.0.0 ===
 
The easiest way to install GNU Octave on Microsoft Windows is using [http://hg.octave.org/mxe-octave/ MXE] builds. For the current 4.0.0 release installers can be found at [https://ftp.gnu.org/gnu/octave/windows/ ftp.gnu.org].
 
Known issues specific to windows version 4.0.0.
#Both cli and gui cannot handle path name of which contains non-ascii characters. (For 3.8, cli can handle non-ascii code if codepage is properly set to the machine locale)
 
====Packages====
Pre-build octave-forge packages are not prepared from octave-3.8 or later for windows. You can install some octave-forge packages using archived sources and build script. However, small flaws exist in current octave-4.0.0_0 distribution. Before install, correct version number of general and signal packages version to 2.0.0 and 1.3.2, respectively and comment out install io package as "#try_install io-2.2.7.tar.gz" in C:\octave\octave-4.0.0\src\build_packages.m". Then execute
 
    >> cd C:\octave\octave-4.0.0\src
    >> build_packages
    >> pkg install -forge io
 
Other octave-forge packages may be installed by
 
  >> pkg install -forge (package name)
 
For detailed instruction of installing Octave-Forge packages is shown at [http://wiki.octave.org/Octave-Forge Octave-Forge]


===Octave-3.8.2 ===
===Octave-3.8.2 ===
Line 84: Line 182:
     start octave --force-gui -i --line-editing
     start octave --force-gui -i --line-editing
     exit
     exit


===Octave-3.6.4-mingw + octaveforge pkgs===
===Octave-3.6.4-mingw + octaveforge pkgs===
Line 750: Line 847:
*From gnuplot-4.4.0, the default terminal of gnuplot for windows is the wxt terminal. Some users may set the GNUTERM environmental variable for the windows terminal being default. The gnuplot for windows allows to set GNUTERM to 'win' (abbreviated form) but octave does not recognize the abbreviated form for terminal name. If one would like set GNUTERM to windows terminal, one should specify it as 'windows' (full form) but not 'win' (abbreviated form). In detail see the following thread: http://old.nabble.com/flicking-problem-again-Octave-3.2.4-mingw32-td28038688.html
*From gnuplot-4.4.0, the default terminal of gnuplot for windows is the wxt terminal. Some users may set the GNUTERM environmental variable for the windows terminal being default. The gnuplot for windows allows to set GNUTERM to 'win' (abbreviated form) but octave does not recognize the abbreviated form for terminal name. If one would like set GNUTERM to windows terminal, one should specify it as 'windows' (full form) but not 'win' (abbreviated form). In detail see the following thread: http://old.nabble.com/flicking-problem-again-Octave-3.2.4-mingw32-td28038688.html


==Octave with Visual Studio==
==Older Octave versions with Visual Studio==


Octave binaries compiled with Microsoft Visual Studio are available for download from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge site]. These binaries come in the form of an easy-to-use installer (created with [http://nsis.sourceforge.net/ NSIS]) and are provided in 2 flavors: pre-compiled version for Visual Studio 2008 and for Visual Studio 2010.
Octave binaries compiled with Microsoft Visual Studio are available for download from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge site]. These binaries come in the form of an easy-to-use installer (created with [http://nsis.sourceforge.net/ NSIS]) and are provided in 2 flavors: pre-compiled version for Visual Studio 2008 and for Visual Studio 2010.
153

edits

Navigation menu