Install EMAN2 » History » Version 28
Neil Voss, 08/13/2012 09:25 PM
| 1 | 1 | Neil Voss | h1. Install EMAN2/SPARX |
|---|---|---|---|
| 2 | |||
| 3 | It is best to install EMAN2/SPARX from source, so that do not have conflicts with having two different versions of python on your system. Binaries of EMAN2/SPARX all come with their own python pre-installed. |
||
| 4 | 2 | Neil Voss | |
| 5 | 6 | Neil Voss | This documentation assumes you are using CentOS 6 (written as of CentOS 6.2) |
| 6 | |||
| 7 | h2. Install require pre-packages for EMAN2 compiling |
||
| 8 | |||
| 9 | 27 | Neil Voss | h3. yum based packages |
| 10 | |||
| 11 | 7 | Neil Voss | * Make sure EPEL is install, if not go here: [[Download additional Software (CentOS Specific)]] |
| 12 | * Use yum to install devel libraries: |
||
| 13 | <pre> |
||
| 14 | 10 | Neil Voss | sudo yum install fftw-devel gsl-devel boost-python numpy \ |
| 15 | 12 | Neil Voss | PyQt4-devel cmake ipython hdf5-devel libtiff-devel libpng-devel \ |
| 16 | 8 | Neil Voss | PyOpenGL ftgl-devel db4-devel python-argparse openmpi-devel |
| 17 | 1 | Neil Voss | </pre> |
| 18 | 27 | Neil Voss | |
| 19 | h3. bsddb3 |
||
| 20 | |||
| 21 | Additionally you need to install the python-bsddb3 library (not available via YUM). I just use the pypi easy_installer, yum will never know. |
||
| 22 | 26 | Neil Voss | <pre> |
| 23 | 1 | Neil Voss | sudo easy_install bsddb3 |
| 24 | </pre> |
||
| 25 | 27 | Neil Voss | |
| 26 | h3. pyMPI |
||
| 27 | |||
| 28 | I think this is a dead module (latest version from 2008), but it is required for some EMAN2/SPARX functions, including sxisac.py |
||
| 29 | |||
| 30 | * Download pyMPI from here: |
||
| 31 | http://sourceforge.net/projects/pympi/files/pyMPI/2.5%20beta/ |
||
| 32 | * Extract the contents: |
||
| 33 | <pre>tar zxvf pyMPI-2.5b0.tar.gz</pre> |
||
| 34 | * Compile: |
||
| 35 | 1 | Neil Voss | <pre> |
| 36 | 27 | Neil Voss | cd pyMPI-2.5b0 |
| 37 | 28 | Neil Voss | export CFLAGS=`python-config --cflags` |
| 38 | export LDFLAGS=`python-config --ldflags` |
||
| 39 | ./configure |
||
| 40 | 1 | Neil Voss | make |
| 41 | 28 | Neil Voss | </pre> |
| 42 | <pre> |
||
| 43 | cd pyMPI-2.5b0 |
||
| 44 | setenv CFLAGS `python-config --cflags` |
||
| 45 | setenv LDFLAGS `python-config --ldflags` |
||
| 46 | ./configure |
||
| 47 | make |
||
| 48 | </pre> |
||
| 49 | 3 | Neil Voss | |
| 50 | h2. Download the source |
||
| 51 | |||
| 52 | # To download the source code go to the link: |
||
| 53 | #* http://blake.bcm.edu/emanwiki/EMAN2 |
||
| 54 | 17 | Neil Voss | # Click on *"Current stable version - direct link"* |
| 55 | 3 | Neil Voss | # Go under the heading "Source" at bottom of page |
| 56 | # Click to download the *eman-source-2.xx.tar.gz* file (as of August 2012, 2.xx is 2.06) |
||
| 57 | |||
| 58 | h2. Work with the source |
||
| 59 | |||
| 60 | # go to the directory with the source code |
||
| 61 | # extract the archive: |
||
| 62 | <pre> |
||
| 63 | 4 | Neil Voss | tar zxvf eman-source-2.06.tar.gz |
| 64 | 1 | Neil Voss | </pre> |
| 65 | 15 | Neil Voss | # go into directory |
| 66 | <pre>cd EMAN2/src/build</pre> |
||
| 67 | 19 | Neil Voss | # start configure script: |
| 68 | 11 | Neil Voss | <pre>cmake ../eman2/</pre> |
| 69 | 15 | Neil Voss | #* Note: alternatively you can run @ccmake ../eman2/@ and configure all the parameters |
| 70 | 18 | Neil Voss | # start compiling: |
| 71 | <pre>make</pre> |
||
| 72 | 3 | Neil Voss | # install to directory: |
| 73 | 23 | Neil Voss | <pre>sudo make install</pre> |
| 74 | |||
| 75 | h2. Set environmental variables |
||
| 76 | |||
| 77 | h3. bash |
||
| 78 | |||
| 79 | <pre>sudo nano /etc/profile.d/eman2.sh</pre> |
||
| 80 | 24 | Neil Voss | |
| 81 | <pre> |
||
| 82 | export EMAN2DIR=/usr/local/EMAN2 |
||
| 83 | export PATH=${EMAN2DIR}/bin:${PATH} |
||
| 84 | 23 | Neil Voss | export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${EMAN2DIR}/lib |
| 85 | export PYTHONPATH=${EMAN2DIR}/lib:${EMAN2DIR}/bin |
||
| 86 | </pre> |
||
| 87 | 16 | Neil Voss | |
| 88 | |||
| 89 | h2. Test to see if code works |
||
| 90 | |||
| 91 | see http://blake.bcm.edu/emanwiki/EMAN2/FAQ/EMAN2_unittest |
||
| 92 | |||
| 93 | <pre> |
||
| 94 | cd EMAN2/test/rt |
||
| 95 | ./rt.py |
||
| 96 | 3 | Neil Voss | </pre> |
| 97 | |||
| 98 | h2. Documentation |
||
| 99 | 9 | Neil Voss | |
| 100 | 3 | Neil Voss | * http://blake.bcm.edu/emanwiki/EMAN2/Install |
| 101 | 2 | Neil Voss | * http://blake.bcm.edu/emanwiki/EMAN2/FAQ/eman2BuildFAQ |
| 102 | |||
| 103 | ______ |
||
| 104 | |||
| 105 | [[Install EMAN|< Install EMAN 1]] | [[Install SPIDER|Install SPIDER >]] |
||
| 106 | 1 | Neil Voss | |
| 107 | ______ |