Compiling EMAN2 on Linux System

Required libraries / Programs

The following libraries are required for EMAN2 installation (the libraries should be installed as shared-object libraries where applicable):

  1. fftw (version 2.1.3+) (http://www.fftw.org/)

    • To install fftw from source use either configure option:

             % ./configure --enable-static=no --enable-shared=yes --enable-float --enable-type-prefix
      OR

       % ./configure --enable-shared=yes --enable-float
  1. gsl (version 1.3+) (http://www.gnu.org/software/gsl/)

        % ./configure
                % make
  1. Boost (version 1.32+) (http://www.boost.org)

    • 3.1 Installing Boost requires Boost.Jam. Executables and
      • source code for jam can be found at the Boost website.
      Installing Boost requires the user to identify a particular toolset to use during compilation. Most UNIX systems will probably use the "gcc" toolset; visit

      http://www.boost.org/more/getting_started.html#Tools for a complete listing. % bjam "-sTOOLS=gcc" install Header files from the Boost installation (located in the "boost" subdirectory of the Boost installation (eg. /boost_1_32_0/boost)) must now either be added to the compilers path or copied into an existing location on the path in a subdirectory /boost. One possibility for this might be: % cp -r boost /usr/include/boost

  2. CMake (version 2.0.6+) (http://www.cmake.org)

    • Executables for several platforms are available; source code can also be used for custom installations.

Optional Libraries / Programs


Quick Installation


Advanced Installation


4.1 Platform Dependent Optimization


4.2 How to Generate Latest Documentation


  1. Install doxygen (version 1.4.3+, http://www.doxygen.org)

  2. Install graphviz (http://www.graphviz.org/)

  3. install latex (http://www.latex-project.org/)

  4. After you have a successful EMAN2 install, i.e., you can import EMAN2 in Python,
    • cd EMAN2/src/build ccmake ../eman2 type 't' toggle to advanced mode, check ENABLE_AUTODOC to ON make make install
    • All documents will be in your EMAN2/doc directory.

Notes For Developers


  1. For Emacs users, please add the following line to your $HOME/.emacs:
    • (setq default-tab-width 4)
  2. Ensure the Boost.Python
  3. To generate new boost python wrapper, run
    • % cd eman2/libpyEM % ./create_boost_python
  4. Windows Installer

Appendix A


A.1. How to Install Boost Python


  1. Download 'bjam' for your platform.
  2. Download boost source from http://www.boost.org. Assume the

    • version is boost_1_32_0. % cd /usr/local/src; tar zxf boost_1_32_0.tar.gz; cd boost_1_32_0.
  3. Set up environment variables "PYTHON_ROOT" and "PYTHON_VERSION".
    • For example, if your python is at /usr/bin/python then PYTHON_ROOT is "/usr". If your python version is 2.2.X, PYTHON_VERSION is '2.2'. a) check your shell: % echo $SHELL b) if you are using bash/zsh, do
      • % export PYTHON_VERSION=2.2 % export PYTHON_ROOT=/usr if you are using csh/tcsh, do % setenv PYTHON_VERSION 2.2 % setenv PYTHON_ROOT /usr
  4. cd libs/python/build [didn't do this]
  5. run 'bjam' with your options:
    • 1) linux-x86: % bjam 2) SGI Irix: % bjam "-sTOOLS=mipspro" 3) Mac OS X: % bjam “-sTOOLS=darwin”
  6. login as root
  7. cp -df bin-stage/libboost_python.so* /usr/local/lib
    • cd ../../..; cp -rf boost /usr/local/include

A.2. How to use your own python version


A.3. How to Install numpy