9362
Comment:
|
13146
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Compiling EMAN2 on Linux System = ||<35%><<TableOfContents>>|| |
= Compiling EMAN2 on Linux System FROM SOURCE= ||<35%><<TableOfContents>> || |
Line 6: | Line 8: |
Line 8: | Line 9: |
This is one of the best EMAN2 development platforms, and what I use now. All of the dependencies can be installed with the package manager and work fine. You will need: ''libhdf5-serial libhdf5-serial-dev lipng12 libpng12-dev libjpeg62 libjpeg62-dev libtiff4 libtiff4-dev python-qt4 python-qt4-gl python-opengl python-matplotlib libfftw3 libfftw3-dev libgsl0-dev db4.8-util libdb4.8 python-bsddb3 libboost-python1.40-dev python-dev cmake cmake-curses-gui ipython'' (and all of the dependencies it wants to install as a consequence) Newer versions of any of these packages should also be ok as replacements, with the exception of python, which MUST be 2.x not 3.x. |
This is one of the best EMAN2 development platforms, and what I use now. All of the dependencies can be installed with the package manager and work fine. You will need: ''libhdf5-serial libhdf5-serial-dev libpng12 libpng12-dev libjpeg62 libjpeg62-dev libtiff4 libtiff4-dev python-qt4 python-qt4-gl python-opengl python-matplotlib libfftw3 libfftw3-dev libgsl0-dev db4.8-util libdb4.8 python-bsddb3 libboost-python1.40-dev python-dev cmake cmake-curses-gui ipython libgl1-mesa-dev libglu1-mesa-dev libftgl2 libftgl-dev'' You may also need the following (but these should already be installed): ''freeglut3 libgl1-mesa-dri libgl-mesa-glx libglu1-mesa libqt4-opengl mesa-common-dev nvidia-current nvidia-settings'' (and all of the dependencies it wants to install as a consequence) Newer versions of any of these packages should also be ok as replacements, with the exception of python, which MUST be 2.x not 3.x. You should be able to install them running apt-get install. Just copy each of the lines below into the command line, one at a time: sudo apt-get install libhdf5-serial sudo apt-get install libhdf5-serial-dev sudo apt-get install libpng12 sudo apt-get install libpng12-dev sudo apt-get install libjpeg62 sudo apt-get install libjpeg62-dev sudo apt-get install libtiff4 libtiff4-dev sudo apt-get install python-qt4 sudo apt-get install python-qt4-gl sudo apt-get install python-opengl sudo apt-get install python-matplotlib sudo apt-get install libfftw3 libfftw3-dev sudo apt-get install libgsl0-dev db4.8-util sudo apt-get install libdb4.8 python-bsddb3 sudo apt-get install libboost-python1.40-dev sudo apt-get install python-dev sudo apt-get install cmake sudo apt-get install cmake-curses-gui ipython sudo apt-get install libgl1-mesa-dev sudo apt-get install libglu1-mesa-dev sudo apt-get install libftgl2 libftgl-dev sudo apt-get install freeglut3 sudo apt-get install libgl1-mesa-dri sudo apt-get install libgl-mesa-glx sudo apt-get install libglu1-mesa sudo apt-get install libqt4-opengl sudo apt-get install mesa-common-dev |
Line 17: | Line 51: |
Unfortunately, a lot of problems, all due to Mandriva using broken versions of various dependencies. Mandriva used to be my platform of choice, but many issues, such as the OpenGL support in PyQt4 being broken, have lead me to stop using this distro. It is possible to make it work by recompiling your own version of many dependencies, but it is a very painful process. * PyQt4 is broken on Mandriva, and you will get a message ''Cannot make invalid context current''. The only solution we have found is to install PyQt4 yourself on top of the system one. |
Unfortunately, a lot of problems, all due to Mandriva using broken versions of various dependencies. Mandriva used to be my platform of choice, but many issues, such as the OpenGL support in PyQt4 being broken, have lead me to stop using this distro. It is possible to make it work by recompiling your own version of many dependencies, but it is a very painful process. * PyQt4 is broken on Mandriva 2009.1, and you will get a message ''Cannot make invalid context current''. The only solution we have found is to install PyQt4 yourself on top of the system one. |
Line 24: | Line 57: |
=== Fedora === All dependent packages can be installed in Fedora system with its package manage system, yum. This is the list of dependent packages I installed for Fedora 14 x86_64 for the default ccmake configuration. What you need install may vary depends on how may libraries pre-exists on you system. There are the compile-time dependent packages. * yum install fftw-devel.x86_64 * yum install gsl-devel.x86_64 * yum install hdf5-devel.x86_64 * yum install python-devel.x86_64 * yum install numpy.x86_64 * yum install boost-devel.x86_64 * yum install freeglut.x86_64 * yum install ftgl-devel.x86_64 (Optional with ENABLE_FTGL in ccmake) After compiling and installing EMAN2, we need install some run time dependent packages for EMAN2's GUI part. * yum install PyQt4.x86_64 * yum install PyOpenGL.noarch * yum install ipython.noarch * yum install python-matplotlib.x86_64 === CentOS 5 === On CentOS system, by default you can find all dependency libraries with yum. You need install EPEL(Extra Packages for Enterprise Linux) first. Follow the instruction on this webpage (http://fedoraproject.org/wiki/EPEL/FAQ#howtouse) to install epel. Then you can do the same thing as in Fedora system to install all dependent packages. |
|
Line 26: | Line 80: |
Line 31: | Line 84: |
Line 34: | Line 85: |
All of these libraries can be installed | All of these libraries can be installed |
Line 37: | Line 88: |
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}}} Followed by: {{{ % make % make install}}} 2. gsl (version 1.3+) (http://www.gnu.org/software/gsl/) {{{ |
=== 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 }}} Followed by: {{{ % make % make install }}} === gsl === (version 1.3+) (http://www.gnu.org/software/gsl/) . {{{ |
Line 54: | Line 111: |
% make install}}} 3. 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}}} 4. CMake (version 2.0.6+) (http://www.cmake.org) Executables for several platforms are available; source code can also be used for custom installations. |
% make install }}} === 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 }}} === CMake === (version 2.0.6+) (http://www.cmake.org) Executables for several platforms are available; source code can also be used for custom installations. === hdf5 === Download the source code file ''hdf5-1.8.7.tar.gz'' from http://www.hdfgroup.org/ftp/HDF5/current/src/ . {{{ % ./configure --disable-dependency-tracking --disable-static --enable-shared make sudo make install }}} === easy_install === To be able to use easy_install on linux, install the python-setuptools package either via the Synaptic Package Manager or just type . {{{ sudo apt-get install python-setuptools }}} |
Line 76: | Line 145: |
* To read/write HDF5 image, use hdf5 (http://hdf.ncsa.uiuc.edu/HDF5). * To read TIFF image, use libtiff (http://www.libtiff.org) * To read PNG image, use PNG (http://www.libpng.org) For development the following libraries/programs are required (see Appendix A for installation help): * Python (version 2.2+) (http://www.python.org) * Boost Python (version 1.32+) (http://www.boost.org) * numpy (http://www.scipy.org) = Quick Installation = Once all the dependencies are installed, you can install the source code using cmake. Suppose you have source code eman2.tar.gz: 1. {{{ |
* To read TIFF image, use libtiff (http://www.libtiff.org) * To read PNG image, use PNG (http://www.libpng.org) For development the following libraries/programs are required (see Appendix A for installation help): * Python (version 2.2+) (http://www.python.org) * Boost Python (version 1.32+) (http://www.boost.org) * numpy (http://www.scipy.org) == Quick Installation == === This is **STILL** part of installation "from source" === Once all the dependencies are installed, you can install the source code using cmake. Suppose you have source code eman2.source.tar.gz: 1. {{{ |
Line 99: | Line 161: |
% mkdir -p EMAN2/src % cd EMAN2/src % gunzip eman2.tar.gz % tar xf eman2.tar}}} 2. {{{ % mkdir build % cd build}}} 3. {{{ |
% tar -zxvf eman2.source.tar.gz }}} 1. {{{ % cd EMAN2/src/build }}} 1. {{{ |
Line 113: | Line 171: |
% make install}}} 4. Set up login shell for csh/tcsh, put the following to your .cshrc or .tcshrc file: {{{ |
% make install }}} 1. Set up login shell for csh/tcsh, put the following to your .cshrc or .tcshrc file: {{{ |
Line 119: | Line 178: |
setenv LD_LIBRARY_PATH $EMAN2DIR/lib setenv PYTHONPATH .:$HOME/EMAN2/lib}}} For bash in .bashrc add: {{{ |
setenv LD_LIBRARY_PATH $EMAN2DIR/lib:${LD_LIBRARY_PATH} setenv PYTHONPATH $EMAN2DIR/lib:${PYTHONPATH} }}} For bash in .bashrc add: {{{ |
Line 126: | Line 185: |
export LD_LIBRARY_PATH=$EMAN2DIR/lib export PYTHONPATH=$PYTHONPATH:$HOME/EMAN2/lib}}} |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EMAN2DIR/lib export PYTHONPATH=$PYTHONPATH:$EMAN2DIR/lib }}} |
Line 132: | Line 190: |
Line 134: | Line 191: |
1. Follow the first 2 steps in Quick Installation. 2. If your libraries are not installed at the default places, set up the related environment variables: * fftw -> FFTWDIR * gsl -> GSLDIR * tiff -> TIFFDIR * png -> PNGDIR * hdf5 -> HDF5DIR * python -> PYTHON_ROOT and PYTHON_VERSION 3. {{{ % ccmake ../eman2}}} * Type 'c' if it asks about "CMAKE_BACKWARDS_COMPATIBILITY". * Make necessary changes for compilation flags. * Developers will probably want to set BOOST-LIBRARY to a Boost.Python object file (ex. libboost_python-gcc-1_32.so) * Then type 'c', and type 'g'. 4. {{{ % make % make install}}} |
1. Follow the first 2 steps in Quick Installation. 1. If your libraries are not installed at the default places, set up the related environment variables: * fftw -> FFTWDIR * gsl -> GSLDIR * tiff -> TIFFDIR * png -> PNGDIR * hdf5 -> HDF5DIR * python -> PYTHON_ROOT and PYTHON_VERSION 1. {{{ % ccmake ../eman2 }}} 1. Type 'c' if it asks about "CMAKE_BACKWARDS_COMPATIBILITY". 1. Make necessary changes for compilation flags. * Developers will probably want to set BOOST-LIBRARY to a Boost.Python object file (ex. libboost_python-gcc-1_32.so) 1. Then type 'c', and type 'g'. 1. {{{ % make % make install }}} |
Line 158: | Line 216: |
{{{ Athlon: ENABLE_ATHLON Opteron(AMD64): ENABLE_OPTERON Mac G5: ENABLE_G5}}} |
. {{{ Athlon: ENABLE_ATHLON x86_64(AMD64): ENABLE_X86_64 Mac G5: ENABLE_G5 }}} |
Line 164: | Line 224: |
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, {{{ |
1. Install doxygen (version 1.4.3+, http://www.doxygen.org) 1. Install graphviz (http://www.graphviz.org/) 1. install latex (http://www.latex-project.org/) 1. After you have a successful EMAN2 install, i.e., you can import EMAN2 in Python, {{{ |
Line 170: | Line 230: |
ccmake ../eman2}}} set ENABLE_AUTODOC to ON, {{{ make make install}}} All documents will be in your EMAN2/doc directory. |
ccmake ../eman2 }}} set ENABLE_AUTODOC to ON, {{{ make make install }}} All documents will be in your EMAN2/doc directory. |
Line 178: | Line 240: |
0. For Emacs users, please add the following line to your $HOME/.emacs: {{{ (setq default-tab-width 4)}}} 1. Ensure the Boost.Python 2. To generate new boost python wrapper, run {{{ % cd eman2/libpyEM % ./create_boost_python}}} 3. Windows Installer: EMAN uses "Nullsoft Scriptable Install System" (http://nsis.sourceforge.net/) to generate the windows installer. It also uses "HM NIS Edit" (http://hmne.sourceforge.net/) as the editor. |
0. For Emacs users, please add the following line to your $HOME/.emacs: {{{ (setq default-tab-width 4) }}} 0. Ensure the Boost.Python 0. Windows Installer: EMAN uses "Nullsoft Scriptable Install System" (http://nsis.sourceforge.net/) to generate the windows installer. It also uses "HM NIS Edit" (http://hmne.sourceforge.net/) as the editor. |
Line 192: | Line 249: |
Line 195: | Line 250: |
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 {{{ |
1. Download 'bjam' for your platform. 1. 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. }}} 1. 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 {{{ |
Line 206: | Line 263: |
% export PYTHON_ROOT=/usr}}} If you are using csh/tcsh, do {{{ |
% export PYTHON_ROOT=/usr }}} If you are using csh/tcsh, do {{{ |
Line 211: | Line 268: |
% setenv PYTHON_ROOT /usr}}} 4. ''cd libs/python/build [didn't do this]'' 5. Run 'bjam' with your options: a) linux-x86: % bjam b) SGI Irix: % bjam "-sTOOLS=mipspro" c) Mac OS X: % bjam "-sTOOLS=darwin" 6. Login as root 7. {{{ |
% setenv PYTHON_ROOT /usr }}} 1. ''cd libs/python/build [didn't do this]'' 1. Run 'bjam' with your options: a) linux-x86: % bjam b) SGI Irix: % bjam "-sTOOLS=mipspro" c) Mac OS X: % bjam "-sTOOLS=darwin" 1. Login as root 1. {{{ |
Line 221: | Line 275: |
cd ../../..; cp -rf boost /usr/local/include}}} |
cd ../../..; cp -rf boost /usr/local/include }}} |
Line 227: | Line 281: |
Line 232: | Line 285: |
* Get source code numpy-1.0.1.tar.gz {{{ |
* Get source code numpy-1.0.1.tar.gz {{{ |
Line 235: | Line 289: |
% tar xf numpy-1.0.1.tar }}} * Login as root. {{{ % cd numpy-1.0.1; % python setup.py install}}} |
% tar xf numpy-1.0.1.tar }}} * Login as root. {{{ % cd numpy-1.0.1; % python setup.py install }}} == A.4. How to Install bsddb3 (instead of using bsddb come with Python) == Download non-encryption version of Berkeley DB (for example, db-5.1.25.NC.tar.gz) from oracle (http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html). . {{{ % tar xvzf db-5.1.25.NC.tar.gz % cd db-5.1.25.NC/build_unix % ../dist/configure --disable-static --prefix="you specify a install directory" % make % make install }}} Download Python bsddb binding (for example, bsddb3-5.1.2.tar.gz) from http://www.jcea.es/programacion/pybsddb.htm . {{{ % tar xvzf bsddb3-5.1.2.tar.gz % cd bsddb3-5.1.2 % python setup.py --berkeley-db="the directory you used to install Berkeley DB" build % python setup.py --berkeley-db="the directory you used to install Berkeley DB" install }}} |
= Compiling EMAN2 on Linux System FROM SOURCE=
Contents
|
Linux Distribution-specific comments
Ubuntu 10.04 (and 9.x for the most part)
This is one of the best EMAN2 development platforms, and what I use now. All of the dependencies can be installed with the package manager and work fine. You will need:
libhdf5-serial libhdf5-serial-dev libpng12 libpng12-dev libjpeg62 libjpeg62-dev libtiff4 libtiff4-dev python-qt4 python-qt4-gl python-opengl python-matplotlib libfftw3 libfftw3-dev libgsl0-dev db4.8-util libdb4.8 python-bsddb3 libboost-python1.40-dev python-dev cmake cmake-curses-gui ipython libgl1-mesa-dev libglu1-mesa-dev libftgl2 libftgl-dev
You may also need the following (but these should already be installed):
freeglut3 libgl1-mesa-dri libgl-mesa-glx libglu1-mesa libqt4-opengl mesa-common-dev nvidia-current nvidia-settings
(and all of the dependencies it wants to install as a consequence) Newer versions of any of these packages should also be ok as replacements, with the exception of python, which MUST be 2.x not 3.x.
You should be able to install them running apt-get install. Just copy each of the lines below into the command line, one at a time:
sudo apt-get install libhdf5-serial sudo apt-get install libhdf5-serial-dev sudo apt-get install libpng12 sudo apt-get install libpng12-dev sudo apt-get install libjpeg62 sudo apt-get install libjpeg62-dev sudo apt-get install libtiff4 libtiff4-dev sudo apt-get install python-qt4 sudo apt-get install python-qt4-gl sudo apt-get install python-opengl sudo apt-get install python-matplotlib sudo apt-get install libfftw3 libfftw3-dev sudo apt-get install libgsl0-dev db4.8-util sudo apt-get install libdb4.8 python-bsddb3 sudo apt-get install libboost-python1.40-dev sudo apt-get install python-dev sudo apt-get install cmake sudo apt-get install cmake-curses-gui ipython sudo apt-get install libgl1-mesa-dev sudo apt-get install libglu1-mesa-dev sudo apt-get install libftgl2 libftgl-dev
sudo apt-get install freeglut3 sudo apt-get install libgl1-mesa-dri sudo apt-get install libgl-mesa-glx sudo apt-get install libglu1-mesa sudo apt-get install libqt4-opengl sudo apt-get install mesa-common-dev
Mandriva 2009.0 - 2010.0
Unfortunately, a lot of problems, all due to Mandriva using broken versions of various dependencies. Mandriva used to be my platform of choice, but many issues, such as the OpenGL support in PyQt4 being broken, have lead me to stop using this distro. It is possible to make it work by recompiling your own version of many dependencies, but it is a very painful process.
PyQt4 is broken on Mandriva 2009.1, and you will get a message Cannot make invalid context current. The only solution we have found is to install PyQt4 yourself on top of the system one.
- No package for bsddb3, install python-setuptools, then you can use easy_install to install bsddb3. Might be a good idea to use a newer version of BerkeleyDB as well, though this may not be strictly required.
- Mandriva uses a broken version of the Boost libraries. You need to install a newer version. You can just put in the default /usr/local location then point to this version in ccmake.
Fedora
All dependent packages can be installed in Fedora system with its package manage system, yum. This is the list of dependent packages I installed for Fedora 14 x86_64 for the default ccmake configuration. What you need install may vary depends on how may libraries pre-exists on you system. There are the compile-time dependent packages.
- yum install fftw-devel.x86_64
- yum install gsl-devel.x86_64
- yum install hdf5-devel.x86_64
- yum install python-devel.x86_64
- yum install numpy.x86_64
- yum install boost-devel.x86_64
- yum install freeglut.x86_64
- yum install ftgl-devel.x86_64 (Optional with ENABLE_FTGL in ccmake)
After compiling and installing EMAN2, we need install some run time dependent packages for EMAN2's GUI part.
yum install PyQt4.x86_64
- yum install PyOpenGL.noarch
- yum install ipython.noarch
- yum install python-matplotlib.x86_64
CentOS 5
On CentOS system, by default you can find all dependency libraries with yum. You need install EPEL(Extra Packages for Enterprise Linux) first. Follow the instruction on this webpage (http://fedoraproject.org/wiki/EPEL/FAQ#howtouse) to install epel. Then you can do the same thing as in Fedora system to install all dependent packages.
External Libraries
EMAN2 has lots of dependent libraries. To compile EMAN2 from source, you need install development packages for these external libraries. Depends on your Linux distribution, you can either install them by yum(Fedora, CentOS, RedHat), urpmi(Mandriva), yast(SuSE), synaptic/apt-get(Ubuntu). Or compile them form source code.
We collect all these dependent packages under this link. These may not be the current versions of EMAN2 dependent libraries, but they are versions we have tried to compile from source and proved works for EMAN2.
Required Libraries / Programs
All of these libraries can be installed
The following libraries are required for EMAN2 installation (the libraries should be installed as shared-object libraries where applicable):
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
Followed by:% make % make install
gsl
(version 1.3+) (http://www.gnu.org/software/gsl/)
% ./configure % make % make install
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
CMake
(version 2.0.6+) (http://www.cmake.org) Executables for several platforms are available; source code can also be used for custom installations.
hdf5
Download the source code file hdf5-1.8.7.tar.gz from http://www.hdfgroup.org/ftp/HDF5/current/src/
% ./configure --disable-dependency-tracking --disable-static --enable-shared make sudo make install
easy_install
To be able to use easy_install on linux, install the python-setuptools package either via the Synaptic Package Manager or just type
sudo apt-get install python-setuptools
Optional Libraries / Programs
To read TIFF image, use libtiff (http://www.libtiff.org)
To read PNG image, use PNG (http://www.libpng.org) For development the following libraries/programs are required (see Appendix A for installation help):
Python (version 2.2+) (http://www.python.org)
Boost Python (version 1.32+) (http://www.boost.org)
numpy (http://www.scipy.org)
Quick Installation
This is **STILL** part of installation "from source"
Once all the dependencies are installed, you can install the source code using cmake. Suppose you have source code eman2.source.tar.gz:
% cd $home/username/ % tar -zxvf eman2.source.tar.gz
% cd EMAN2/src/build
% cmake ../eman2 % make % make install
- Set up login shell for csh/tcsh, put the following to your .cshrc or .tcshrc file:
setenv EMAN2DIR $home/username/EMAN2 setenv PATH $EMAN2DIR/bin:${PATH} setenv LD_LIBRARY_PATH $EMAN2DIR/lib:${LD_LIBRARY_PATH} setenv PYTHONPATH $EMAN2DIR/lib:${PYTHONPATH}
For bash in .bashrc add:export EMAN2DIR=/home/username/EMAN2 export PATH=$PATH:$EMAN2DIR/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EMAN2DIR/lib export PYTHONPATH=$PYTHONPATH:$EMAN2DIR/lib
Advanced Installation
If your libraries (fftw, gsl, hdf, etc) are not found by Quick Installation, or if you want to change the compilation options, the following steps help:
- Follow the first 2 steps in Quick Installation.
- If your libraries are not installed at the default places, set up the related environment variables:
fftw -> FFTWDIR
gsl -> GSLDIR
tiff -> TIFFDIR
png -> PNGDIR
hdf5 -> HDF5DIR
python -> PYTHON_ROOT and PYTHON_VERSION
% ccmake ../eman2
- Type 'c' if it asks about "CMAKE_BACKWARDS_COMPATIBILITY".
- Make necessary changes for compilation flags.
- Developers will probably want to set BOOST-LIBRARY to a Boost.Python object file (ex. libboost_python-gcc-1_32.so)
- Then type 'c', and type 'g'.
% make % make install
Platform Dependent Optimization
In CMake Configuration, enable the following option for your platform:
Athlon: ENABLE_ATHLON x86_64(AMD64): ENABLE_X86_64 Mac G5: ENABLE_G5
How to Generate Latest Documentation
Install doxygen (version 1.4.3+, http://www.doxygen.org)
Install graphviz (http://www.graphviz.org/)
install latex (http://www.latex-project.org/)
- After you have a successful EMAN2 install, i.e., you can import EMAN2 in Python,
cd EMAN2/src/build ccmake ../eman2
set ENABLE_AUTODOC to ON,make make install
All documents will be in your EMAN2/doc directory.
Notes For Developers
- For Emacs users, please add the following line to your $HOME/.emacs:
(setq default-tab-width 4)
- Ensure the Boost.Python
- Windows Installer:
EMAN uses "Nullsoft Scriptable Install System" (http://nsis.sourceforge.net/) to generate the windows installer. It also uses "HM NIS Edit" (http://hmne.sourceforge.net/) as the editor.
Appendix A
A.1. How to Install Boost Python
- Download 'bjam' for your platform.
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.
- 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
- a) Check your shell:
cd libs/python/build [didn't do this]
- Run 'bjam' with your options: a) linux-x86: % bjam b) SGI Irix: % bjam "-sTOOLS=mipspro" c) Mac OS X: % bjam "-sTOOLS=darwin"
- Login as root
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
If the python you want to use in your computer is not found by CMake, you may set up environment variables "PYTHON_ROOT" and "PYTHON_VERSION". For example, if your python is at /usr/local/python2.4/bin/python. PYTHON_ROOT is "/usr/local/python2.4". if your python is 2.4.X, PYTHON_VERSION is '2.4'.
A.3. How to Install numpy
From the website http://sourceforge.net/projects/numpy download source package.
For windows, run the binary installer and the installation is complete. Other users must download the source code and install manually as follows:
- Get source code numpy-1.0.1.tar.gz
% gunzip numpy-1.0.1.tar.gz % tar xf numpy-1.0.1.tar
- Login as root.
% cd numpy-1.0.1; % python setup.py install
A.4. How to Install bsddb3 (instead of using bsddb come with Python)
Download non-encryption version of Berkeley DB (for example, db-5.1.25.NC.tar.gz) from oracle (http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html).
% tar xvzf db-5.1.25.NC.tar.gz % cd db-5.1.25.NC/build_unix % ../dist/configure --disable-static --prefix="you specify a install directory" % make % make install
Download Python bsddb binding (for example, bsddb3-5.1.2.tar.gz) from http://www.jcea.es/programacion/pybsddb.htm
% tar xvzf bsddb3-5.1.2.tar.gz % cd bsddb3-5.1.2 % python setup.py --berkeley-db="the directory you used to install Berkeley DB" build % python setup.py --berkeley-db="the directory you used to install Berkeley DB" install