The SPARX source installer installs SPARX, EMAN2 and the SPARX gui, along with all third-party programs they require. Everything is put into a user-chosen directory; the installer does NOT require administrator (root) privileges, does not touch anything outside that directory, and it does not interfere with other installed libraries.
The list of third-party programs included is found here. The third-party programs are all open source/free software released under various licences.
The idea behind the installer is that third-party programs are updated infrequently, while SPARX / EMAN2 are updated frequently. The first time the source installer is used, all packages are compiled, which can take several hours. Updating SPARX / EMAN2 from this first installation takes much less time, typically minutes.
Instructions for the first (full) installation are found below, followed by instructions for updating SPARX/EMAN2 .
sparx is developed on various linux systems, and the installer should work on these:
- Fedora Core 5/6
- Mandriva 2006/2007
- SuSE 10.1
- Centos 4.2
- Debian (testing/unstable)
Fedora Core 4 has some problems with EMAN2. There are many unit test failures, so Fedora Core 4 is not recommended as a platform for sparx/eman2.
The macos port is incomplete.
The windows port is incomplete.
The SPARX installer lives in a single subdirectory chosen by the user; in the following instructions, this is /your/installer/path. In this directory, all needed packages are built.
The packages are "installed" under a second user-chosen directory, here named /your/sparxroot.
The installer does NOT touch anything outside those two directories, and it does not interfere with other installed libraries. It only uses basic system libraries, so it should work on any Linux system. If it fails to build, let me (email@example.com) know.
The installer checks for required packages when it is run and reports missing ones. For reference, the currently needed packages include:
- gnu make
- a C/C++ compiler
- the subversion revision control system (command svn)
For full installation including the graphical parts, you must also have
- an X installation including header files
Installation from source
This takes substantially longer than a binary installation but
- it is fully compatible with your system
- you can make additions to the installer itself if you need more packages (and send the additions back to make them permanent in the installer).
- updating packages is straightforward. As sparx changes heavily, this is critical.
mkdir /your/installer/path cd /your/installer/path
svn co svn://cci.lbl.gov/sparx-installer/trunk \ sparx-installer
If you do not have subversion, and don't mind reinstalling everything occasionally, you can instead use this:
wget http://cci.lbl.gov/~hohn/sparx-installer.tar.gz tar zxvf sparx-installer.tar.gz
If you don't have wget, try curl instead:
curl http://cci.lbl.gov/~hohn/sparx-installer.tar.gz -o sparx-installer.tar.gz
cd sparx-installer ./configure /your/sparxroot
The last step (./configure) will print a summary. If there are any errors, your system is missing the listed prerequisite(s).
The full install is done via
For headless machines (like cluster nodes), you can use
which is a much smaller build that doesn't require X11.
After running the install script, you must follow the update instructions below before running sparx.
Type ./configure -h for help.
Some compilation times
./install -j 8
distcc, 8 x Intel(R) Xeon(TM) CPUs (4 physical), 2.80GHz
./install -j 12
distcc, 16 x Intel(R) Xeon(TM) CPUs (8 physical), 2.80GHz
./install -j 8
8 x AMD Opteron(tm) Processor 8347, 1.9GHz, using tmpfs
Current version, ./install-no-gui.
4 x Dual Core AMD Opteron(tm) Processor 285, 2.6GHz
Assuming the ./install command finished successfully, you should try the following tests.
cd /your/sparxroot/ . ./sparx.setpath # or source sparx.setpath.csh # This should just exit successfully sparx.python -c '"import EMAN2"' # Try a test. pushd ./eman2/install/test/rt sparx.python test_emdata.py popd # Try the gui sparx.gui # Try sparx console sparx # cctbx sparx.python -c '"import iotbx.pdb"' # iotbx iotbx.pdb.hierarchy # EMAN2 2-D image viewer pushd sparx/test/ e2display.py test.spi popd
The SPARX commands must be made available before they can be used. There are two choices, depending on your shell:
- if you use csh:
- if you use ksh, sh or bash:
- Both commands make one addition to your PATH environment variable, nothing more.
If you don't want to do this every time, add the appropriate line to your shell's init file (.cshrc, .tcshrc, .bashrc, etc.)
Once the .setpath is sourced, some new commands available are:
sparx.gui -- start the gui
sparx -- start the sparx console
sparx.python -- run python with environment set up for SPARX
To update SPARX and EMAN2
Developers with access to the sources can update as described here.
Others can use the following scripts to get the morning snapshot.
. /your/sparxroot/sparx.setpath sparx.update-sparx sparx.update-eman2
Typical output should look like this:
$ sparx.update-sparx * Archive old install at .../sparx-bin/archive/sparx-05.02.07-4622.tar.gz * Get new sources. * Remove old source. * Extract. * Post-install. * Done.
The archive is formed in case the update fails, or in case the updated package produces odd results. For sparx, restoring an old version could be done via e.g.
cd $SPXROOT \rm -fR sparx tar zxf archive/sparx-05.02.07-4312.tar.gz