AFNI Install on OS X El Capitan

It's been two and half years (three, if you round up) since I uploaded the first videos about AFNI: How to install it, how to run it, how to make it fulfill all your wildest dreams, which may or may not include taking a dollop of Nutella, drying it in the sun, grinding it into a fine powder, and then snorting it.

I was in Rochester for three weeks in July, lodged at a fly-blown hostel. During the days I would talk with researchers and go to meetings and help design studies, but found myself more often on the benches of Eastman Quadrangle, lazily swatting at mosquitoes and feeling the burst of their rubescent abdomens against my skin. I would sit outside where in the distance you could see a church with large oval stained glass and I would think about nothing in particular. The weather in the mornings was perfect, and I took my exercise down by the Erie canal, up around Cobbs Hill Reservoir, and through neighborhoods I didn't know. In the evenings I would make my way downtown for music at the Eastman School and barbecue on the Genesee. And in those nights I worked, obsessively, on those tutorials and videos whose fate had somehow become strangely entangled with mine. Who knew who was reading, who was watching? There was something of an inverted voyeuristic pleasure in thinking about it.

And now here I am, three years later, promoted to seedy manhood and reminiscing of towns and cities; those icy runs on the country lanes of Northfield in windchills of forty below; going to the piano rooms of the Wexner center to practice Scriabin etudes and my beloved, immortal Waldstein; running around Woodlawn field, each loop zero point four-two miles, running ten, twenty, thirty loops at a time, hoping that enough physical exertion would work off a serious infection of heartsickness; crossing the finish line in Indianapolis with burning lungs and knotted calves, surrounded by the vomit of fellow runners, the clock just a shade under two hours and thirty minutes, feeling something break inside me and knowing it was the end of something.

Such were the days, comrades - and how the days have changed! All that I did back then was well enough for its time; but as new wine requires new bottles, so do new operating systems require new installation instructions; and it has come to my attention that several AFNI users are having issues, both technically and emotionally, with getting AFNI to cooperate with Macintosh's newest OS, El Capitan (which is Spanish for, "The Capitan.")

Sensing that urgent action was needed, I turned on my computer, booted up my web browser, and sat with my posterior firmly planted on my chair until somebody else fixed the problem. Fortunately this was not long in coming, and Pete Molfese over at Crash Log has documented how to do it; however, as I am sensitive to how long it takes to click on links, I have reproduced all of the instructions here in full, along with a helpful video which maybe includes a special effect involving my sports jacket.

Here are the steps:

  1. Install XQuartz from xquartz.org (Allows GUIs to run from Unix shells; the "X" symbol that pops up in your dock when you first run AFNI)
  2. Install XCode from the Apple Store
  3. Install Homebrew (a package manager for Mac) using the following command:
    1. For bash: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    2. For tcsh: curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby
    3. Use homebrew to get the following:
      1. The GNU Compiler Collection (GCC) with: brew install gcc --with-all-languages --without-multilib
      2. Pyqt, which you'll need for the .py scripts in AFNI: brew install cartr/qt4/pyqt
      3. GLib, low-level libraries that take care of the little things under the hood: brew install glib
      4. Link libgomp to the correct location using the following:
        1. ln -s /usr/local/Cellar/gcc/5.3.0/lib/gcc/5/libgomp.1.dylib /usr/local/lib/libgomp
        2. Note that the version is continually being updated, so this command may change; for example, replace the 5.2.0 part with 5.3.0. Check the path to /usr/local/Cellar/gcc to see if the path exists. If you link the wrong path, rerun the command with the correct path and the -sf option.
        3. Download the latest AFNI package here, or type the following into your terminal (assuming you are installing version 10.7; replace with whatever version you want to download):

cd

mkdir abin

curl -O http://afni.nimh.nih.gov/pub/dist/tgz/macosx_10.7_Intel_64.tgz

 tar -xzf macosx_10.7_Intel_64.tgz

mv macosx_10.7_Intel_64 abin

rm macosx_10.7_Intel_64.tgz

  1. Paste the following commands from the AFNI install webpage into your terminal (for tcsh shell):

echo 'set path = (/usr/local/bin $path $HOME/abin)' >> .cshrc

echo 'setenv DYLD_FALLBACK_LIBRARY_PATH $HOME/abin' >> .cshrc

echo 'setenv PYTHONPATH /usr/local/lib/python2.y/site-packages' >> .cshrc

source .cshrc

rehash