<<TableOfContents: execution failed [list index out of range] (see also the log)>> |
IMPORTANT: It is still possible to compile EMAN2 "the old way", but if you wish access to some of the new capabilities, you will need to have SciPy and Theano installed in your Python Environment. We are shifting towards an Anaconda-based build strategy similar to the new Binary distribution. We will post those instructions soon.
Linux Distribution-specific comments
Arch Linux
Arch is an extremely flexible Linux variant, which doesn't have release versions, but instead updates packages continuously over time. It is not for newbies, but for experts, it is an excellent choice.
Arch now uses Python3 by default rather than Python2. All of the EMAN scripts look for 'python'. So you need to arrange that in your account 'python' launches Python2 (by making a link, etc).
Install dependencies:
pacman -S python2-numpy hdf5 fftw boost libtiff libpng cmake gsl ftgl python2-matplotlib ipython qt4 python2-pyqt4 python2-opengl
Ubuntu and Kubuntu
This is one of the best EMAN2 development platforms, and what I use now, though I use Kubuntu due to its improved desktop and Qt integration (Gnome has become irritating recently). One of the best things about this distribution is that ALL of the dependencies are available from the package manager. However, with recent ubuntu releases, I suggest installing 'synaptic' and using that in preference to the current default package managers, which don't find development packages very readily. It is possible that we've missed something in the list of dependencies below, so please let us know if something is still broken.
15.04 (Kubuntu)
Run the following command, which uses the apt-get package manager: sudo apt-get -yq install libhdf5-serial-dev libpng12-0 libpng12-dev libtiff5 libtiff5-dev python-qt4 python-qt4-gl python-opengl python-matplotlib libfftw3-3 libfftw3-dev libgsl0-dev db-util libdb-dev python-bsddb3 libboost-all-dev python-dev cmake cmake-curses-gui ipython libgl1-mesa-dev libglu1-mesa-dev libftgl2 libftgl-dev
13.04 - 14.04
Install the following (you can just use apt-get install): libhdf5-7 libhdf5-dev libpng12-0 libpng12-dev libtiff4 libtiff4-dev python-qt4 python-qt4-gl python-opengl python-matplotlib libfftw3-3 libfftw3-dev libgsl0-dev db-util libdb-dev python-bsddb3 libboost-all-dev python-dev cmake cmake-curses-gui ipython libgl1-mesa-dev libglu1-mesa-dev libftgl2 libftgl-dev
12.10 and earlier
The version numbers in this list are a bit out of date, so you will need to search for the current version of each package. 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 they may already be installed):
freeglut3 libgl1-mesa-dri libgl-mesa-glx libglu1-mesa libqt4-opengl mesa-common-dev
Assuming you have an Nvidia based graphics card (you should):
nvidia-current nvidia-settings
Note that Python MUST be 2.X not 3.X. While you can install packages from the command-line with apt-get, it may be more difficult to find the right version numbers that way.
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. Note that EMAN2.1 requires Python 2.7.x, so if your default system python is older than this, you will need to install a newer python in /usr/local or somesuch, and install the necessary dependencies there as well. For most people, it might be easier to simply bite the bullet and update your OS to something newer.
- 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 6
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.
CentOS 7
This was contributed by Jesper Karlsen, who needed to get EMAN2/SPARX working on a cluster with MPI support (updated by Steve to fix some errors )
WARNING - While CentOS 7 is a nice, stable OS, normal releases use GCC4, rather than the newer GCC5. This will reduce performace by 30-40% for EMAN2 and similar programs! Unless you have a hack to get GCC5 working on CentOS, I suggest a different distribution
Most of the dependencies can be installed through yum, if the EPEL repository is installed:
- sudo yum install epel-release
and then run:
sudo yum install gsl gsl-devel mesa-libGLU mesa-libGLU-devel ftgl-devel ftgl freetype freetype-devel boost-devel boost-openmpi-devel boost-python PyQt4 PyQt4-devel sip sip-devel numpy scipy hdf5-devel h5py hdf5 libtiff libtiff-devel libpng libjpeg-turbo-devel python-devel freeglut python-matplotlib fftw-libs.x86_64 fftw-libs-double.x86_64 fftw-libs-single.x86_64 fftw-devel.x86_64 python-ipython.noarch python-ipython-console.noarch PyOpenGL.noarch
I needed to get EMAN2 and sparx to run with MPI on our cluster and realized that the OpenMPI from the CentOS did not work, as it needed to be configured with the "--disable-dlopen" to work with EMAN2, which is mentioned in the wiki:
http://blake.bcm.edu/emanwiki/EMAN2/Parallel/PyDusa
The "install_mpi.py --force" option that installs the MPI support for EMAN2/Sparx and a customized version of OpenMPI, was not an option for me. I needed OpenMPI as an RPM, since I have many other program from repository that depends on the OpenMPI package. The Best way i my perspective was to get the latest src.rpm from OpenMPI and rebuild it with the correct flags:
rpmbuild --rebuild --define 'configure_options --disable-dlopen' openmpi-1.8.4-1.src.rpm
This rebuilds a RPM into e.g. ~/rpmbuild/RPMS/x86_64/ if you have a 64bit machine. Install the RPM
sudo rpm -ivh --force ~/rpmbuild/RPMS/x86_64/openmpi-1.8.4-1.x86_64.rpm
Before you go a head and try to compile the PyDusa program, you need to apply the attached patch to the config file. In CentOS 7.0 Python modules are spread in /usr/lib/python2.7 and /usr/lib64/python2.7. The patch adds the right path for NUMPY to CentOS 7.0. For this reason it is also a good idea to add /usr/lib64/python2.7 to your PYTHONPATH.
Now compile and install EMAN2 as described at:
http://blake.bcm.edu/emanwiki/EMAN2/COMPILE_EMAN2_LINUX
Add the EMAN2 environments to your upstart script in e.g. /etc/profile.d/eman2.sh, Containing something like this:
export EMAN2DIR=/usr/local/EMAN2.1 export PATH=${EMAN2DIR}/bin:$PATH export PYTHONPATH=${EMAN2DIR}/lib:${EMAN2DIR}/bin:${PYTHONPATH} export LD_LIBRARY_PATH=${EMAN2DIR}/lib:$LD_LIBRARY_PATH alias sparx=sx.py
Log out/in or run "source /etc/profile.d/eman2.sh"
Now you can add the EMAN2/Sparx MPI support by following the description here:
http://blake.bcm.edu/emanwiki/EMAN2/Parallel/PyDusa
Hopefully you should have a fully functioning EMAN2/Sparx installation with MPI support by now.
This method gives a very clean environment. Where you do not have contamination of "foreign" environment and library files, which could give you a lot of grief.