Differences between revisions 7 and 8
Revision 7 as of 2017-02-11 07:23:52
Size: 5679
Editor: SteveLudtke
Comment:
Revision 8 as of 2017-02-11 22:26:47
Size: 3797
Editor: SteveLudtke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
 1. Install FFTW from source. Compile both normal (double) and --enable-single. This requires running ''configure'' and ''make install'' twice. While there are a dozen different versions available from anaconda, I didn't want to try and find one that had the necessary versions, so I just built it. If someone figures out one that works, let me know. You will also need --enable-shared and I used --prefix=$HOME (so you don't have to deal with the Mac's annoying security subsystem).
Line 56: Line 55:
 1. Once all of this is done, all you have to do is get your CMake configuration to point at all of the right files. Unfortunately, since the current CMakeLists file doesn't search anaconda at the moment, this is a manual process:  1. 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:
Line 58: Line 57:
BOOST_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include/boost
BOOST_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libboost_python.dylib
FREETYPE_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include/freetype2
FREETYPE_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libfreetype.dylib
FTGL_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
FTGL_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libftgl.2.dylib
GSL_CBLAS_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
GSL_CBLAS_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libgslcblas.dylib
GSL_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
GSL_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libgsl.dylib
HDF5_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
HDF5_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libhdf5.dylib
JPEG_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
JPEG_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libjpeg.dylib
NUMPY_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/lib/python2.7/site-packages/numpy/core/include
PNG_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
PNG_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libpng.dylib
PYTHON_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include/python2.7
PYTHON_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libpython2.7.dylib
TIFF_INCLUDE_PATH:PATH=/Users/stevel/anaconda2/include
TIFF_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libtiff.dylib
ZLIB_LIBRARY:FILEPATH=/Users/stevel/anaconda2/lib/libz.dylib

FFTW3_INCLUDE_PATH:PATH=/Users/stevel/include
FFTW3_LIBRARY:FILEPATH=/Users/stevel/lib/libfftw3f.dylib
FFTW3d_INCLUDE_PATH:PATH=/Users/stevel/include
FFTW3d_LIBRARY:FILEPATH=/Users/stevel/lib/libfftw3.dylib
PYTHON_INCLUDE_PATH:PATH=$HOME/anaconda2/include/python2.7
PYTHON_LIBRARY:FILEPATH=$HOME/anaconda2/lib/libpython2.7.dylib
ZLIB_LIBRARY:FILEPATH=$HOME/anaconda2/lib/libz.dylib

Installing EMAN2.2 on OSX 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" command which does this (I just reset the entire PATH to avoid building up redundancies):
    useconda2='export PYTHONPATH=$HOME/EMAN2/lib:$HOME/EMAN2/bin; 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 (conda install). 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
    Here is the list of packages (installed above) with versions known to work in Feb, 2017. You shouldn't need to do anything with this, if you installed above:
    boost                     1.63.0                   py27_4    conda-forge
    boost-cpp                 1.63.0                        1    conda-forge
    fftw                      3.3.5                         0    conda-forge
    bsddb                     1.0                      py27_1  
    cmake                     3.6.3                         0  
    freetype                  2.5.5                         2  
    ftgl                      2.1.3                         2    jmbell
    gsl                       2.2.1                         0  
    hdf5                      1.8.17                        1  
    ipython                   5.1.0                    py27_0  
    ipython_genutils          0.1.0                    py27_0  
    jpeg                      9b                            0  
    libpng                    1.6.27                        0  
    libtiff                   4.0.6                         3  
    matplotlib                1.5.3               np111py27_0  
    numpy                     1.11.1                   py27_0  
    pyopengl                  3.0.2                    py27_0  
    pyqt                      4.11.4                   py27_4  
    qt                        4.8.7                         4  
    scikit-learn              0.17.1              np111py27_2  
    scipy                     0.18.1              np111py27_0  
    theano                    0.8.2                    py27_0  
    tk                        8.5.18                        0  
  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:PATH=$HOME/anaconda2/include/python2.7
    PYTHON_LIBRARY:FILEPATH=$HOME/anaconda2/lib/libpython2.7.dylib
    ZLIB_LIBRARY:FILEPATH=$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.

EMAN2/COMPILE_EMAN2_MAC_OS_X (last edited 2017-03-16 18:58:44 by SteveLudtke)