help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave Problem with Mac OS X


From: Stuart Edwards
Subject: Re: Octave Problem with Mac OS X
Date: Fri, 13 Jan 2012 08:31:05 -0500


On Jan 12, 2012, at 11:42 PM, Fitzgerald Barry wrote:

Hello,
 
My daughter installed Octave on her Mac Book Pro and it does not seem to work. Each time she enters anything, it returns "syntax error". I then installed Octave on my Windows PC and she was able to enter same data and was able to plot it with no problem. Are there known issues associated with Mac OS X? Downloaded versions and URL from which they were downloaded are shown below.
 
The version my daughter installed on her Mac Book Pro appeared on the website http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/ and was the first link at the top of the webpage named 2011-04-21 binary of Octave 3.4.0 and does not seem to work.
 
The version I installed on my Windows PC appeared on the website http://sourceforge.net/projects/octave/files/Octave_Windows%20-%20MinGW/Octave%203.4.3%20for%20Windows%20MinGW%20Installer/ and was the first link at the top of the webpage named Octave3.4.3_gcc4.5.2-install.exe
 
Please HELP.
 
Thank you. 

This seems to be a common problem and has been discussed here on several occasions in the past few months.  I was preparing the following for the 'wiki' but hadn't quite finished it.  It should help you anyway.

The following is current as of 20120105.  The installation process has been confirmed on an iMac running OS X 10.6.8 that has never previously had octave or gnuplot installed.  

Download this binary  (octave-3.4.0-i386.dmg) at: 


It's the latest version of octave for which an OS X binary is available.

Mount (double click) the dmg.

Look in the 'Extras' folder and find a gnuplot-4.4.3-aqua-i386.dmg disc image.

This is a nice OS X binary of an up to date version of gnuplot and, ironically, may be the only place such a gnuplot binary exists for OS X.  As an added bonus this gnuplot package includes and relies on Aquaterm a windowing system that many Mac users feel produces more elegant plots than X11. 

Open (double click) this dmg.

Move the 'Gnuplot' icon to your Applications folder. For purpose of this discussion - this is assumed to be /Applications.  If you are using a local Applications folder (/~/Applications) appropriate modification of the paths specified below will be necessary.

At this point, Aquaterm is now also installed. It is located at /Applications/Gnuplot.app/Contents/Resources/lib/Aquaterm.app   If you need it for some other application, this is the path that will find it.  But don't move it to the upper level of the Applications folder - gnuplot will be looking for it where it self-installs.  (To inspect the contents of an .app right click or control-click on it and select 'show package contents')

Move the 'Octave' icon from the first .dmg to the same folder (/Applications).  It is strongly suggested that gnuplot be installed before octave.

Now you have everything you need to run octave/gnuplot/aquaterm.  You can put the octave and gnuplot icons in the dock and either will open in a terminal window with a simple 'click'.  To test octave, click its icon, and the octave prompt should appear in a new terminal window along with some splash screen information.  Then type 'sombrero(24)' at the octave prompt and after a while aquaterm will open and the multicolor sombrero plot should appear.  

Starting octave from the command line requires one further step to inform bash (your shell) where the octave binary is located.  This is accomplished through the bash initialization file /.bashrc (. means it's normally invisible in the finder).  The simplest way is to add the PATH to the octave binary to your $PATH.

Open a new terminal window.  Type (without the # comments):
touch /.bashrc    # this creates a .bashrc file if one does not exist
open /.bashrc # this opens .bashrc as a text document (probably in TextEdit unless you have it set up for some other editor)

In the document type:

export PATH=$PATH:/Applications/Octave/Contents/Resources/bin    # this appends the octave binary path to your existing path

save and close .bashrc

Either open a new terminal window, or type 'source /.bashrc' in the existing one (to re-initialize it) and then simply type 'octave' at the command line.  Octave should start as described above and you can repeat the 'sombrero' test to make sure everything is working properly.

Good luck

Stu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]