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: Ben Abbott
Subject: Re: Octave Problem with Mac OS X
Date: Mon, 16 Jan 2012 14:15:47 -0500

On Jan 16, 2012, at 12:40 PM, Stuart Edwards wrote:

> 
> On Jan 16, 2012, at 9:06 AM, Fitzgerald Barry wrote:
>>  
>>  I apologize for the fact that I still need your help. I am not sure where I 
>> went wrong, however, below is the message received in a terminal window.
>> My daughter is actually the one who is required to use Octave for a college 
>> assignment and the Mac Book Pro is hers. Unfortunately, I do very well with 
>> my Windows PC but I find it difficult to maneuver the same on an Apple. I 
>> hope there is a quick fix to this so that she can get to work on her 
>> assignment.
>> 
>>  
>>  
>> Last login: Sun Jan 15 16:33:59 on ttys002 
>> Mackenzie-Fitzgeralds-MacBook-Pro:~ mackenziefitzgerald$ exec 
>> '/Applications/Octave.app/Contents/Resources/bin/octave'
>> GNU Octave, version 3.4.0
>> Copyright (C) 2011 John W. Eaton and others.
>> This is free software; see the source code for copying conditions.
>> There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR 
>> A PARTICULAR PURPOSE.  For details, type `warranty'.
>>  
>> Octave was configured for "x86_64-apple-darwin10.7.3".
>>  
>> Additional information about Octave is available at http://www.octave.org.
>>  
>> Please contribute if you find this software useful.
>> For more information, visit http://www.octave.org/help-wanted.html
>>  
>> Read http://www.octave.org/bugs.html to learn how to submit bug reports.
>>  
>> For information about changes from previous versions, type `news'.
>>  
>> octave-3.4.0:1> sombrero(24)
>> error: popen2: popen2 (child): unable to start process -- No such file or 
>> directory
>> error: called from:
>> error:   
>> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_open_stream__.m
>>  at line 30, column 44
>> error:   
>> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/__gnuplot_drawnow__.m
>>  at line 72, column 19
>> sh: gnuplot: command not found
>> error: `unset' undefined near line 2 column 1
>> warning: broken pipe -- some output may be lost
>>  
>>  
>> On Jan 13, 2012, at 8:43 AM, Fitzgerald Barry wrote:
>> 
>> 
>>  Thank you so much for your response. Quick question. Prior to downloading 
>> and installing octave-3.4.0-i386.dmg that you have suggested, should I 
>> completely eliminate the previous version 2011-04-21 binary of Octave 3.4.0 
>> from her Mac? (that was previously installed and did not function properly)
>>  
>> It actually looks to be the same binary.  But yes, I would reinstall it 
>> making sure to install gnuplot first.  So put the octave.app in the trash, 
>> re-mount the disc image and follow the steps outlined below.  Note that if 
>> you want to start octave from the command line (open 
>> /Applications/Utilities/Terminal.app) you will have to add the path to the 
>> octave binary as outlined below.  
>>  
>> Stu
>> 
>> 
>> From: Stuart Edwards [mailto:address@hidden 
>> Sent: Friday, January 13, 2012 8:31 AM
>> To: Fitzgerald Barry
>> Cc: address@hidden; address@hidden
>> Subject: Re: Octave Problem with Mac OS X
>> Importance: High
>>  
>>  
>> 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: 
>>  
>> http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/
>>  
>>  
>> 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
>> 
> 
> No problem, most likely you didn't go wrong - Looks like you made some 
> progress anyway.  It appears that octave is not able to find gnuplot.  I 
> think we can fix that.  I also noticed an error in my instructions that we 
> should fix at the same time.  The error is in setting the .bashrc file up at 
> the system level and not the user level. i.e. /.bashrc  instead of ~/.bashrc. 
>  I doubt it's caused any problem - but we'll fix it anyway.
> 
> In a new terminal window do  (ignoring the # comments)  :
> 
> sudo touch /usr/bin/gnuplot               # creates an empty 'dummy' gnuplot 
> file in /usr/bin which is included in most  PATHs. sudo invokes the 
> 'superuser' or administrator and will ask for a password ....  then:
> 
> ln -s  /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot   
> /usr/bin/gnuplot      #creates a link between the binary in the app and the 
> new dummy gnuplot file.
> 
> touch /usr/bin/octave     # while we're at it, may as well do the same thing 
> for octave
> 
> ln -s /Applications/Octave.app/Contents/Resources/octave   /usr/bin/octave    
>  # this is a cleaner way of inserting octave in your PATH so it can be 
> started from the command line
> 
>  #  Now to make sure that /usr/bin is in your path do:
> 
> env
> 
> # there should be several lines of text in response including something like 
> :  
> PATH=/opt/local/bin:/opt/local/sbin:/usr/local/Trolltech/Qt-4.3.4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/texbin:/usr/local/bin
>    -- check to see that /usr/bin: is included
> 
> If it is, octave and gnuplot should work fine now.  If not, we need to go 
> back to the .bashrc file
> 
> sudo rm /.bashrc            # deletes the incorrect file - do this anyway - 
> it serves no purpose. 
> touch .bashrc                  # creates local .bashrc file
> open .bashrc                   # opens it in the editor
> 
> #  type this in the editor:
> 
> PATH=$PATH:/usr/bin
> Export PATH
> 
> # save and close
> 
> Things should work now .......  let me know if there are still any problems.
> 
> Stu

Stuart,

Can I invite / encourage you to document these instructions in the new wiki ?

        http://www.octave.org/wiki/index.php?title=Main_Page

Ben




reply via email to

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