03 March 2013

350. Installing GNU Octave on Windows XP

This is a Windows XP post (my first?), so right-thinking linux people can move on. Nothing to see here.

For the rest of you:
Since I can't force my students to switch to Linux -- but I can force the to use Octave and Gnuplot -- I need to make sure that there are some easy, step-by-step (recipe-based) guides available that describe how to install the tools that they are required to use on their platform of choice. OS X has many flaws, but has macports. Windows has cygwin, in addition to native builds of most GNU tools. I'll cover cygwin in a separate post.

Here's a pretty straightforward approach to installing GNU Octave and I've tested it on Windows XP. It suffers from a fatal weakness: it takes well over a minute (!) to actually start Octave this way -- each timeUse the cygwin approach insteadhttp://verahill.blogspot.com.au/2013/03/353-cygwin-with-octave-and-gnuplot-on.html -- this way it's about as fast as on Linux.

0. 7zip and notepad++
You'll need 7zip: http://www.7-zip.org/ and http://notepad-plus-plus.org/. Download and install.

1.  Download Octave
Go to http://wiki.octave.org/Octave_for_Windows
The most current version is 3.6.2 ("Octave-3.6.2-mingw + octaveforge pkgs"), which takes you here: http://downloads.sourceforge.net/project/octave/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20MinGW%20installer/Octave3.6.2_gcc4.6.2_20120609.7z

2. Set up
The downloaded file is 169 Mb but extracts to 700 Mb(!) so even the extraction process takes a little while. Extract with 7zip by right-clicking the downloaded file, selecting 7zip, and extract to "Octave...".

Create C:\octave, and put the Octave3.6.2_gcc4.6.2 folder in it.

Right click on C:\octave\Octave3.6.2_gcc4.6.2\bin\octave.exe and select create shortcut. Copy the shortcut to e.g. your desktop. Edit it and click on change icon -- select "C:\Octave\Octave3.6.2_gcc4.6.2\share\octave\3.6.2\imagelib\octave-logo.ico".

3. Running
Simply double-click on the shortcut.
Here's the bad news: it takes 1 m 20 s to start, which is unacceptable.

4. Packages
To install packages without having a full build environment, download from

Extract the file, and copy the bin, include, lib, share folders to c:\octave\Octave3.6.2_gcc4.6.2\ so that the folders merge with those from step 2.

Start octave and run
pkg rebuild -noauto nan

This way all packages (except nan) will auto-load next time you start octave.

No comments:

Post a Comment