The following instructions will guide to install sparx and EMAN2 to your home directory.

Download and unpack EMAN2/sparx source code

The source code can be found at web page http://ncmi.bcm.edu/ncmi/software/counter_222/software_86, although you might need fill out a registration form.

After you get the file (eman2.nightly.source.tar.gz), move it to home directory and unpack it:

        tar -zxvf eman2.nightly.source.tar.gz

which would create directory EMAN2 under your home directory,

NOTE: on multi-CPU machines all make commands can be replaced to make -j 4 where 4 is the number of CPUs available. It will significantly reduce the time of compilation.

Install some 3rd party libraries(fftw, etc.)

EMAN2 employs the following 3rd party libraries: fftw, gsl, boost, hdf5, jpeglib (optional), tifflib (optional).

install fftw

            cd $HOME/EMAN2/src
            wget http://www.fftw.org/fftw-3.2.tar.gz
            tar -zxvf fftw-3.2.tar.gz
            cd fftw-3.2
            # enable the single precission version and shared library
            ./configure --enable-float --enable-shared
            make 
            sudo make install

the last step will ask you for your password.

install gsl (GNU Scientific library)

           cd $HOME/EMAN2/src
           wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.10.tar.gz
           tar -zxvf gsl-1.10.tar.gz
           cd gsl-1.10
           ./configure 
           make 
           sudo make install

install boost

Note: the latest version is 1.35 but it seems to has some problem on Mac, we will stick to 1.34_1 for now.

            cd $HOME/EMAN2/src
            curl http://superb-west.dl.sourceforge.net/sourceforge/boost/boost_1_34_1.tar.gz -o boost_1_34_1.tar.gz
            tar -zxvf boost_1_34_1.tar.gz
            cd boost_1_34_1
            ./configure --prefix=/usr/local
            make 
            make install

install hdf5

         cd $HOME/EMAN2/src
         wget ftp://ftp.hdfgroup.org/HDF5/current16/src/hdf5-1.6.8.tar.gz
         tar -zxvf hdf5-1.6.8.tar.gz
         cd hdf5-1.6.8
         ./configure --prefix=/usr/local
         make -j 4
         sudo make install

install numpy

        cd $HOME/EMAN2/src
        wget http://superb-west.dl.sourceforge.net/sourceforge/numpy/numpy-1.0.4.tar.gz
        tar -zxvf numpy-1.0.4.tar.gz
        cd numpy-1.0.4
        sudo python setup.py install

install berkeley db (Mac OS X only)

        cd $HOME/EMAN2/src
        curl http://download.oracle.com/berkeley-db/db-4.7.25.NC.tar.gz -o db-4.7.25.NC.tar.gz
        tar -zxvf db-4.7.25.NC.tar.gz
        cd db-4.7.25.NC/build_unix
        ../dist/configure --prefix=/usr
        make 
        make install

install setuptools python module

        cd $HOME/EMAN2/src
        wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz#md5=0e9bbe1466f3ee29588cc09d3211a010
        tar -zxvf setuptools-0.6c8.tar.gz 
        cd setuptools-0.6c8
        sudo python setup.py install

install python module for berkeley db (optional)

        cd $HOME/EMAN2/src
        wget http://pypi.python.org/packages/source/b/bsddb3/bsddb3-4.7.2.tar.gz#md5=77b23d137eaa1153327ef93b10ddcfc1
        tar -zxvf bsddb3-4.7.2.tar.gz
        cd bsddb3-4.7.2
        sudo python setup.py install

about jpeglib and tifflib

it is not recommended to install jpeglib and tifflib, since they conflict with system libraries

install cmake

install EMAN2

compilation

            cd $HOME/EMAN2/src/build
            cmake ../eman2
            ccmake ../eman2

an interface will popup in which you have to setup environmental variables, set the following (replace your user name for xxx):

            ENABLE_BOOST       : ON  # not necessary ??  PAP
            ENABLE_JPEG        : OFF
            ENABLE_TIFF        : OFF

            BOOST_INCLUDE_PATH : /usr/local/include/boost-1_34_1

            BOOST_LIBRARY      : /usr/local/lib/libboost_python.so

            make 
            make install    

install IPython (Interactive Python)

        cd $HOME/EMAN2/src
        wget http://ipython.scipy.org/dist/ipython-0.9.1.tar.gz 
        tar -zxvf ipython-0.9.1.tar.gz
        cd ipython-0.9.1
        sudo python setup.py install

7. setup the environment:

        export PATH=$PATH:$HOME/EMAN2/bin:$HOME/EMAN2/sparx/bin
        export LD_LIBRARY_PATH=$HOME/EMAN2/lib
        export PYTHONPATH=$HOME/EMAN2/lib:$HOME/EMAN2/sparx/libpy

        setenv  LD_LIBRARY_PATH /Users/pawel/EMAN2/lib
        setenv  PYTHONPATH  $HOME/EMAN2/lib:$HOMEEMAN2/sparx/libpy
        set path=( $HOME/EMAN2/bin $HOME/EMAN2/sparx/bin .)

start sparx

    chmod +x $HOME/EMAN2/sparx/bin/sparx

install sparx with GUI (optional)

install Qt4

install sip

           cd $HOME/EMAN2/src/
           curl http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.7.9.tar.gz -o sip-4.7.9.tar.gz
           tar -zxvf sip-4.7.9.tar.gz
           cd sip-4.7.9
           python configure.py
           make
           sudo make install

install PyQt4

           cd $HOME/EMAN2/src
           wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.4.4.tar.gz
           tar -zxf http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.4.4.tar.gz
           cd PyQt-x11-gpl-4.4.4
           python configure.py # answer yes to question
           make 
           sudo make install

install PyOpenGL

           cd $HOME/EMAN2/src
           wget http://superb-west.dl.sourceforge.net/sourceforge/pyopengl/PyOpenGL-3.0.0b1.tar.gz 
           tar -zxvf PyOpenGL-3.0.0b1.tar.gz
           cd PyOpenGL-3.0.0b1
           sudo python setup.py install

install matplotlib

           cd $HOME/EMAN2/src
           wget http://superb-west.dl.sourceforge.net/sourceforge/matplotlib/matplotlib-0.91.2.tar.gz 
           tar -zxvf matplotlib-0.91.2.tar.gz
           cd matplotlib-0.91.2
           python setup.py install

SourceCodeInstallationUnix (last edited 2013-07-01 13:12:49 by localhost)