Installing Xmipp
Xmipp3.0 has been successfully tested on the OS shown in the following table:
| OS |
Distribution |
Version |
| GNU/Linux |
OpenSuSE |
12.1 |
| Ubuntu |
11.10 |
| 12.04 |
| Debian |
6.0.4 |
| Mint |
12 |
| Arch |
2011.08.19 |
| Mandriva |
2011 |
| Fedora |
16 |
| Gentoo |
20120306 |
If you have been able to compile Xmipp 3.0 in any different OS, distro or version, please let us
know.
There are several ways to install Xmipp:
Step 1: Download
Latest stable release
Fill in the
XMIPP DOWNLOAD FORM (if you prefer to use the new way, enter
here. Note we will not share your information with anyone!) to download precompiled (Linux) binaries or the platform-independent source.
Possibly unstable developmental version
Programmers contributing to Xmipp may download the latest (possibly unstable) development version from SVN (see also
xmipp@sourceforge). Note that this option is NOT recommended for standard users, and we cannot give feed-back on bugs in the development version.
svn co http://newxmipp.svn.sourceforge.net/svnroot/newxmipp/trunk/xmipp
If you are a developer and want to submit changes, download with
svn co https://newxmipp.svn.sourceforge.net/svnroot/newxmipp/trunk/xmipp
Note: Windows users should go directly to their
dedicated subsection first.
Step 2: Install
If you just want to run on your Linux desktop machine, the precompiled binaries will probably work for you, and are definitely the easiest way to install. If you are installing Xmipp on a cluster (using MPI for parallelization), then you will most probably have to compile from source.
Using precompiled binaries
Uncompress the tarball in the directory where you wish to install Xmipp:
$ tar zxvf Xmipp-%XMIPPVERSION%-i386.tar.gz
Building from source
Uncompress the tarball (or download it already uncompressed from the svn repository), go to the directory, and find the installation script written to ease the installation process (install.sh). Run it with
./install.sh
Note: Be sure that all external build dependencies are satisfied before you run the installation script. The external dependencies are:
for xmipp itself...
make
g++
opempi
java (jdk)
for avoiding some anoying warning messages on python compilation and for making the development more confortable...
ssl
ncurses
readline
Depending on the OS, you must take different actions to satisfy those external dependencies:
OpenSUSE 12.1
From an
OpenSUSE base installation, packages that must be installed from
OpenSUSE repositories are:
make
gcc-c++
openmpi-devel
xorg-x11-libX11-devel
java-1_6_0-openjdk-devel
Packages can be installed by typing in the command line the following command:
sudo zypper --no-refresh install make gcc-c++ openmpi-devel xorg-x11-libX11-devel java-1_6_0-openjdk-devel
Optionally, some extra python modules can be compiled by installing following packages:
readline-devel
libopenssl-devel
python-pyOpenSSL
ncurses-devel
To do so, following command must be executed in the command line:
sudo zypper --no-refresh install readline-devel libopenssl-devel python-pyOpenSSL ncurses-devel
Ubuntu 11.10/12.04 & Debian 6.0.4 & Linux Mint 12
From a clean Ubuntu 11.10 or Debian 6.0.4 installation, packages that must be installed from repositories are:
build-essential
openmpi-dev
openmpi-bin
libx11-dev
openjdk-6-jdk
For doing it, you can use the following command:
sudo apt-get install build-essential openmpi-dev openmpi-bin libx11-dev openjdk-6-jdk
For the extra python modules, you need to install:
libncurses-dev
libssl-dev
libreadline-dev
It can be done just typing:
sudo apt-get install libncurses-dev libssl-dev libreadline-dev
Arch 2011.08.19
If you're trying to install Xmipp3.0 on an Arch Linux clean installation, be sure your g++ version is the apropiate one. Xmipp3.0 doesn't compile with >4.6.2 versions, so if you have =4.7.0 (default in core-devel repositories) you will need to downgrade it. To do so, just download it from
GNU website, untar it (with tar -xvjf gcc-4.6.2.tar.bz2), configure and compile it.
For compiling it, according to GNU guidelines, you should need to create a different directory for the object files.
mkdir objdir && cd objdir
Then you can configure it:
srcdir/configure
When it finish, you can compile it from the objdir with...
make
Finally, you can install the new compiler doing as root...
make install
Once you've got the apropiate compiler, you can start resolving Xmipp3.0 dependencies. The required are the following:
gcc (<4.7.0)
make
openmpi
libx11
openjdk6
In order to install these packages, you should write in the command line the command...
pacman -S make openmpi libx11 openjdk6
Note that gcc has already been installed by compiling and not using pacman utility to avoid the 4.7.0 version that comes by default with Arch repositories.
Optional dependencies, but recommended, are written below:
openssl
readline
pyopenssl
ncurses
To install them in Arch, type the next command:
pacman -S openssl readline pyopenssl ncurses
Gentoo 20120306
To install Xmipp3.0 over GNU/Linux Gentoo, you need to emerge the following software:
openmpi
libX11
icedtea-bin
This can be achieved by writting in the command line...
emerge openmpi libX11 icedtea-bin
If you want to complete the optional installation without any python warning and all functionalities working, then install also this software:
openssl
ncurses
readline
by doing in the command line...
emerge openssl ncurses readline
Note: In Gentoo, JAVA_HOME environment variable is not properly taken by the Xmipp installation script, so you will need to set it manually. If you installed icedtea-bin, you will have to write...
/etc/java-config-2/current-system-vm
in the JAVA_HOME setting field, in order to make Xmipp compile with java support
Mandriva 2011
Installing Xmipp on Madriva 2011 requires the following external libraries to be installed:
openmpi
libopenmpi-devel
gcc-c++
libx11-devel
java-1.6.0-openjdk-devel
That can be done executing as root:
urpmi openmpi openmpi-devel gcc-c++ libx11-devel java-1.6.0-openjdk-devel
To complete the installation of python with all the modules that could be useful for Xmipp, you need to have installed these extra packages:
libreadline-devel
libopenssl-devel
To commit that, just execute as root:
urpmi libreadline-devel libopenssl-devel
Fedora 16
From a Fedora 16 clean installation, packages that will be needed for having Xmipp working are:
gcc-c++
openmpi-devel
libX11-devel
java-1.6.0-openjdk-devel
In Fedora 16, this can be done typing in the command line the following order:
sudo yum install gcc-c++ openmpi-devel libX11-devel java-1.6.0-openjdk-devel
To avoid the python warning messages during the compilation, this packages must be installed:
readline-devel
libopenssl-devel
From the command line, executing the following line will commit the installation of those packets:
sudo yum install readline-devel libopenssl-devel
There's a difference in Fedora16 respecting to the rest of the distributions. openmpi binaries are not introduced automatically in the PATH variable after openmpi package installation, so it has to be done manually. To do so, just insert the following line at the end of your ~/.bashrc file:
export PATH=$PATH:/usr/lib/openmpi/bin
If you need to proceed with the installation without rebooting the system or login again, just type that order directly in the console from where you're installing Xmipp.
Windows
Xmipp can be compiled and used in Cygwin (
http://www.cygwin.com). You need to install a number of development packages before being able to fully compile it. Instead, you may download an already prepared installation of cygwin from
xmipp_cygwin.rar.
- Decompress the file in some directory of your hard disk (let's say C:).
- Create a shortcut to cygwin shell program (C:\cygwin\Cygwin.bat).
- Type "cd coss/xmipp" in the shell.
- Update xmipp to the latest version with "svn update" or download it with the svn command shown at the top of this page (and execute ./install.sh)
- If you're updating Xmipp from previous compilation, recompile with ./setup.py configure compile gui
Xmipp libraries (.dll) are left in C:\cygwin\home\coss\xmipp\lib, the Xmipp binaries are in C:\cygwin\home\coss\xmipp\bin.
For the compilation of the Java binding you need to have installed a Java JDK. The one currently used by this installation is Jdk1.6.0_30, that must be at C:\Program Files\Java\jdk1.6.0_30. To change the JDK you may use:
export JAVA_HOME=yourJDKdir
and then configure and compile it with
./setup.py configure compile gui
Step 3: Edit the environment setup
Finally, inform each user's shell of Xmipp's existence. By default, the binaries are in the
bin and
lib subdirectories of the Xmipp directory structure. After Xmipp's installation, a bashrc file is generated in the Xmipp's folder. To set automatically the environment variables needed to run Xmipp, you just have to put this line in users' .bashrc file.
test -s ~/Xmipp_dir/.xmipp.bashrc && . ~/Xmipp_dir/.xmipp.bashrc || true
Note: On Gentoo GNU/Linux this line should be included in /etc/profile file instead of ~/.bashrc, or alternatively you can add the following lines to /etc/profile...
if [ -e ~/.bashrc ] ; then
. ~/.bashrc
fi
Step 4: (only for clusters) Configure your parallel environment for the protocols
Some of the protocols can be run in parallel on large computer clusters. Since every cluster is different, this requires some additional configuring.
Choose a SystemFlavour
First, edit the file
applications/scripts/protocols/protocol_setup.py (from your Xmipp top directory) and modify the line that says
SystemFlavour = ''. Choose a SystemFlavour that suits your system as explained in the
ParallelPage. If your system is not included, you may also modify the
applications/scripts/protocols/launch_job.py to add your own system.
After modifying these files, recompile them by typing in the Xmipp top directory:
./scons.compile
Make a job submission script
Second, to ease job submission by the users, we recommend making a job submission script to submit xmipp protocols using your particular queueing system. Again, see the
ParallelPage for detailed instructions. An example script (for TORQUE queues) may be found at the
QsubPyCrunchy page. After making the script for your system, call it
qsub.py, make it executable, and place it in a directory that is in your
$PATH (e.g.
XMIPP_directory/bin.)</verbatim>
Step 5 (optional but recommended): Running libraries' tests
If you want to be sure about if external libraries where correctly installed, you can run their tests by executing (from inside Xmipp directory) this command:
xcompile gtest=yes run_tests
If everything is OK and green, you probably have Xmipp3.0 installed correctly. Otherwise, send us your
error messages.