Changes

Jump to navigation Jump to search
2,783 bytes removed ,  08:37, 30 January 2012
Clean up (could use a review). We'll eventually want to have separate sections for 3.2,x, 3.4.x, 3.6,x, etc.
'''Introduction to the Bundle'''Installing Octave on a mac should be a breeze since is there a nice bundle that's easily downloaded and contains everything that you will need . But there's a lot of new users that run into problems, and for good reason. If you These install instructions are a mac user and are suddenly faced with installing stuff that requires you verified to delve into the bowels of your computer work for the first time (or even the second or third) - it can be mighty intimidating and success can be illusive. This writer knows first hand. So this is largely for those at the low end of the experience spectrum, although there may be some tips that help the power user community if they have need to make Octave work in the mac world. I hope so, because the things they contribute certainly help me out a lot.Octave is a numerical computation software platform. It can calculate just about anything that you can imagine. But if you want to see the results graphically, you need a plotting system to make that happen. That's another application called Gnuplot. Gnuplot takes output from Octave and plots it in windows on your screen - or sends it off to print or whatever you want to do. This requires a windowing system - (now we're getting a bit closer to the bowels) - and the most common one is X11. This is installed by default on OS X 10.5 and above. However many mac users prefer the appearance of another windowing system - Aquaterm. So this part of the wiki helps you to install Octave and make it plot your results through Gnuplot using the Aquaterm windowing system. At the end I'll try and deal with some of the issues that arise during installation that might make it seem like 'it just doesn't work'. '''Let's do it'''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 andOctober 04, ironically, may be the only place such a gnuplot 2011 binary exists for OS XOctave 3. As an added bonus this gnuplot package includes and relies on Aquaterm the windowing system that many Mac users feel produces more elegant plots than X114. Mount (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 application0], 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 hosted 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 should open and the multicolor sombrero plot should appearsourceforge.
'''Problems, problems, problems ........'''= Download the DMG =
If you did all of the above and there is no result, most likely you got the octave prompt, typed the 'sombreroThe latest MacOS X binary (24DMG)' test, but no plot showed upavailable is for Octave-3.4.0. You probably got some error message that included the line 'shClick on this [http: gnuplot: command not found'//sourceforge. This means (surprise, surprise) that net/projects/octave couldn't find gnuplot in order to pass on the plot information/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203. We can fix that, but it requires some unix magic on the command line4. We are going to create 'dummy' applications at a location where OS X will search and be sure 0/ link] to find themdownload. Open a new terminal window (/Applications/Utilities/Terminal) and do (ignoring the # comments):
> sudo touch /usr/bin/gnuplot # creates an empty 'dummy' gnuplot file in directory /usr/bin which is included in most PATHs. sudo invokes Once it has been downloaded, double-click on the dmg to mount the 'superuser' or administrator and will ask for a password ..disk image.It is recomended that Gnuplot is installed prior to Octave. then:
> ln -s /Applications/= Install Gnuplot.app/Contents/Resources/bin/gnuplot /usr/bin/gnuplot #creates a link between the binary in the app in your Applications folder and the new dummy gnuplot file (in the bowels).& Aquaterm =
> touch /usr/bin/octave # while weLook in the 're at it, may as well do Extras' folder and find the gnuplot-4.4.3-aqua-i386.dmg disc image. Double-click this dmg to mount the same thing for octaveGnuplot disk image.
> ln -s On this disk is the OS X binary for Gnuplot. The Gnuplot package includes and relies on Aquaterm for displaying plots using [http:/Applications/Octaveen.appwikipedia.org/Contentswiki/Resources/octave /usr/bin/octave # this is a good way of inserting octave in your PATH so it Quartz_(graphics_layer) Apple's Quartz graphics layer]. Alternatively, X11 can be started from used. However, the command linepleasant anti-aliasing features of Quartz will are not included with X11 on MacOS X.
Now Move the 'Gnuplot' icon to make sure that /usr/bin is in your path do: > env Applications folder. For purpose of this should produce several lines of text in response including something like : PATH=/opt/local/bin:/opt/local/sbin:/usr/local:/bin:/sbin:'''/usr/bin:'''/usr/sbin:/usr/texbin:/usr/local/bin discussion -- check this is assumed to see that be /usr/bin: is included If it is, octave and gnuplot should work fine nowApplications. If not, we need to go to the .bashrc file. This is you are using alocal Applications folder (n invisible/~/Applications) file that sets things that are important to you up every time you open a new terminal windowappropriate modification of the paths specified below will be necessary. Type this at the prompt:
> touch This Gnuplot application includes Aquaterm.bashrc # creates It is located at /Applications/Gnuplot.bashrc file if one doesnapp/Contents/Resources/lib/Aquaterm.app If you need it for some other application, this is the path that will find it. But don't exist;> open move it to the upper level of the Applications folder, or else Gnuplot will not know where to find it.bashrc # opens it in your editor (probably Textedit)
type this in the editor:= Install Octave =
PATH=$PATH:Move the 'Octave' icon from the first .dmg to the Applications folder (/usr/bin;export PATHApplications).
save Now you have everything you need to run Octave, Gnuplot, and closeAquaterm. 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.
Things should work now ....... Open a new terminal window = Running Octave and type 'octave' then 'sombrero(24)' at the prompt. Starting octave Gnuplot from the command line requires these steps to inform bash (your shell) where the octave binary is located. a Terminal =
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 (the leading "." means it'''Some Other Solutions'''s normally invisible in the finder). To run Octave and Gnuplot from a terminal, symbolic links will be used.
There are other issues that come up that are largely * Open a function of new terminal window, and enter the way you have your system set up and, perhaps, what remnants of octavecommands below.** {{Codeline|sudo touch /usr/local/bin/gnuplot}}** {{Codeline|sudo ln -s /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot /usr/local/bin/gnuplot}}** {{Codeline|sudo touch /usr/local/bin/octave}}** {{Codeline|sudo ln -s /aquatermApplications/X11 you have floating around in itOctave. Following are things app/Contents/Resources/octave /usr/local/bin/octave}}* Test that might help when it just refuses to workeverything is ok.** In a Terminal window type the command below.*** {{Codeline|octave}}** Octave should now be running. To test Gnuplot / Aquaterm, try a plot.*** {{Codeline|sombrero ()}}
Open .bashrc and add:export GNUTERMAPP=If Octave did not run, check to ensure that your PATH includes /usr/Applicationslocal/AquaTermbin.app;export GNUTERM=aqua
save * From the Terminal prompt, type,** {{Codeline|env}}* If the PATH does not include /usr/local/bin, type the commands below.** Open ~/.bashrc in an editor*** {{Codeline|touch ~/.bashrc}}*** {{Codeline|open ~/.bashrc}}** Add the line below to the contents of ~/.bashrc*** {{Codeline|<nowiki>export PATH=$PATH:/usr/local/bin</nowiki>}}** Save ~/.bashrc and closeexit* If the PATH does include /usr/local/bin, help may be requested by posting to [https://mailman.cae.wisc.edu/listinfo/help-octave Octave's email list]. Please provide a detailed description of what you've tried and what the results were.
364

edits

Navigation menu