NOTE2: I haven't tried it yet (I don't have a 'Mac') but the octave-forge pkg issues below would probably be resolved by install octave-devel (3.6.3) instead of octave (3.2.1) in which case you can simply download everything from the octave-forge site instead. The packages there aren't compatible with octave 3.2, since it's too old.
I'm no friend of Apple, Mac or OS X for many reasons (restrictive environment, weird mouse, their typical target audience), but pragmatism will make you happier than zealotry. What doesn't work for me obviously works for other people.
Students (and professors) at Australian universities do use apple laptops in significant number though (yet our ERP system only works properly with Internet Explorer -- try requesting leave using chrome on linux and you may be in for a surprise) so I've recently been faced with the issue of installing my standard linux tools on students' apple laptops. In fact it's gotten so bad that several Australian universities 'give' ipads to all their students for 'free' (nothing is free when you're paying for it through your tuition). As someone working at a uni I resent this since, by using the one platform where you can't install what you want on it, this puts pressure on me to restrict my teaching to what can be had via the almighty app store. (there's a lot of BS about blended learning, and you'd be lucky to find a white board anywhere. Blackboards are completely gone which is idiocy of the first degree)
Anyway. There's plenty of people here using Macbook-thingies and it's in my own interest to get them on the narrow path to justice, liberty and the FOSS way.
Macports is a really cool package manager/repository for linux software for Mac OSX and works by compiling the software from the sources -- pretty much how I imagine that the Gentoo experience may be like. Anyway, it works fine although it takes a fair amount of time to install things.
So here's how to do it (no screenshots because I'm typing this from memory):
- Open the App Store and install XCode (free)
- Open Xcode, go to Preferences/Download, and install Command Line Tools
- Download macports via this link for OS X 10.8: https://distfiles.macports.org/MacPorts/MacPorts-2.1.2-10.8-MountainLion.pkg
Other versions of OS X are also supported, see here: http://www.macports.org/install.php - Install the downloaded macports by opening the .pkg file
- Open a Terminal window (Applications/Utilities/Terminal) and run
- Run
- Run
- Run octave by running the command
octave
in the terminal. - To install octave packages you can install them via macports in the terminal environment like a good Linux kid:
sudo ports install octave-miscellaneous octave-struct octave-optim
Note: RIGHT NOW octave-general doesn't install which prevents optim from being installed. - QTOctave: according to what I found online you should edit your ~/.octaverc file and put
setenv("GNUTERM","X11")
to be able to plot in qtoctave (plotting in octave launched from the terminal is fine). I had no luck with it. Setting it in the program didn't help either. Possibly you need to look at 2.1.1 here: http://guide.macports.org/#installing.x11
sudo ports -v selfupdate
sudo ports install gnuplotwhich will take a while -- it needs to set up the build environment from scfatch in addition to regular dependencies. Set aside an hour or so just in case. If there's an error, try running the command once more.
sudo ports install octavewhich will take a long while. If the compile seems to have stopped, checked the titlebar of the terminal window -- the command it's executing will continously change during the compile)
Things that don't work at the moment (25 Jan 2013):
* octave forge packages that depend on octave-general won't install until octave-general has been fixed. That'd be most packages.
* macports octave is too old for the octave-forge packages online.
* I personally haven't figured out the X11 settings.
It'll take well over an hour, but at the end of it you'll have Octave, Gnuplot AND a complete build environment!
And there are plenty more things you can install with macports (e.g. qtoctave (qtoctave-mac), gedit (gedit gedit-plugins), kile, maxima, qtiplot).
Not sure why I am so excited over it since all these things are available in most linux repos, but there you go.
Hiç yorum yok:
Yorum Gönder