This is my installation guide for MacOS. If you’re looking for Windows, see My Windows Installation.
Grab the newest stable version…at this writing that’s 5.38.0-MacOSX.
**note that there’s a newer version in the download directory — 5.40 — but I haven’t been able to make that work on my Mac**
Below is what you see when you open the installer. The first three steps are easy, the fourth requires a bit of patience:
- drag Maxima to the Applications folder
- drag wxMaxima to the Applications folder
- drag Gnuplot to the Applications folder (If you have an old machine with Core 2 duo skip this and see the instructions at the bottom of this post)
- open the jsMath TeX fonts folder, and click on the six font files one at a time. Each time a window will appear, inviting you to click and install that font. Do. That. Each. Time.
Next up, you can navigate to your Applications folder and open wxMaxima. In the wxMaxima window, try a command (try 2+2 SHIFT ENTER). If nothing happens or you get an error message, you’ll need to tell the program where to find your newly installed copy of Maxima.
Go to wxMaxima —> Preferences… —> Maxima, click open, and navigate to the Applications folder and double click on the Maxima icon
At that point, close and re-open wxMaxima and you can execute Maxima commands (try 2+2 SHIFT ENTER).
How to configure plotting:
Plotting probably won’t work correctly right out of the box. Try copying and pasting this onto the wxMaxima command line, followed by SHIFT ENTER:
If you get an error like the one above, two last things need to be done:
First, go to wxMaxima —> Preferences… —> Options and if “Use cairo to improve plot quality.” is checked, unselect it.
Finally, we need to create a configuration file. We need to tell Maxima where to find gnuplot on your computer, and we need to let each of the draw and plot functions know where to open external windows. I’ve made a MacOS app called Maximascript makes those things happen*:
Download the configuration app
After downloading the app, MacOS will of course prevent you from double clicking and running an unknown app you got from an unknown source, so you’ll need to find Maximascript in Finder—Downloads, double-finger click and select Open, and then agree that you want to open it. The result will be almost underwhelming — a terminal window opens and displays the line “maxima script” to let you know that things happened as planned. You can close that window.
To be sure everything is working go back to wxMaxima and try copying and pasting these four commands, one at a time, in the wxMaxima window to confirm that each flavor of the Maxima plot/draw utility works
wxplot2d(sin(x),[x,0,10]); /* should plot in wxMaxima window */ plot2d(sin(x),[x,0,10]); /* should open a gnuplot window, close this window before proceeding */ wxdraw2d(explicit(sin(x),x,0,10)); /* draw in wxMaxima window */ draw2d(explicit(sin(x),x,0,10)); /*opens a gnuplot window close this window before proceeding */
If you’re running a Core 2 Duo processor
It appears that there are compiler directives in recent Gnuplot binaries that don’t work on the older processors. In this case, you’ll need to compile your own Gnuplot executable. Here’s an easy-ish way to do that using Homebrew:
- copy, paste and run this long line in a terminal window:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- When that is done working, make sure that the soon-to-be installation directory is owned by you (you’ll be prompted for your password)
sudo chown -R `whoami` /usr/local
- Now install gnuplot with
brew install gnuplot --with-qt5
- change the first line of ~/.maxima/maxima-init.mac to read
*What’s happening inside Maximascript:
Maximascript is a shell script that I wrapped up as a clickable MacOS app using the free program Platypus. It creates a new directory called .maxima in the home directory, and creates a file called maxima-init.mac The app adds these three lines to the init file:
gnuplot_command:"/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot"$ set_plot_options([gnuplot_term, qt])$ set_draw_defaults(terminal=qt)$
If you’re a veteran terminal shell user, just create the directory .maxima in the home directory with mkdir, open maxima-init.mac in an editor, and paste in those 3 lines.