Installing EMAN2.2 on OSX from source with Anaconda

These instructions worked for me on Sierra (10.12). I expect they would also work on versions back several years, but cannot guarantee it.

PLEASE report any problems or update the page!

  1. Install current Python2.x Anaconda from https://www.continuum.io/downloads (remember EMAN is Python2 not Python3). When installing put anaconda in your home directory and name it 'anaconda2'.

  2. Obviously you will need to have XCode installed on your Mac as well
  3. configure account to use this anaconda. I have a "useconda2" alias which does this (I just reset the entire PATH to avoid building up redundancies):
    useconda2='export PYTHONPATH=$HOME/EMAN2/lib:$HOME/EMAN2/bin; export EMAN2DIR=$HOME/EMAN2; export PATH=.:$HOME/anaconda2/bin:$HOME/EMAN2/bin:$HOME/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Developer/usr/bin:/Applications/Chimera.app/Contents/MacOS'
  4. Install other necessary Anaconda modules. This includes specific versions for a few. I don't recall how many of these were already installed and how many I had to do. Note that some need a specific version, eg:
    conda install qt=4 pyqt=4
    and a couple are from other channels, eg:
    conda install -c conda-forge boost boost-cpp fftw
    conda install -c jmbell ftgl
    The rest:
    conda install bsddb freetype gsl hdf5 ipython jpeg libpng libtiff matplotlib numpy=1.11 pyopengl scikit-learn scipy theano tk cmake
  5. Once all of this is done, all you have to do is get your CMake configuration to point at all of the right files. CMake should find everything automatically with 3 exceptions, as long as you put a directory called anaconda2 in your home directory. Replace $HOME below with your actual home directory:
    PYTHON_INCLUDE_PATH=$HOME/anaconda2/include/python2.7
    PYTHON_LIBRARY=$HOME/anaconda2/lib/libpython2.7.dylib
    ZLIB_LIBRARY=$HOME/anaconda2/lib/libz.dylib

Once this was done (it really didn't take very long to do), everything works for me, including the GUI. While I haven't tested absolutely everything, I did go through a lot of the tutorial and everything seemed fine.

Troubleshooting