1 Frequently Asked Questions
1.1 How do I fix the configure errors?
The error
XML::Parser perl module is required for intltool
has different fixes on different linux flavors.
On recent redhat systems (fedora core), simply do
yum install perl-XML-Parser
On ubuntu or other debian-based systems, this is
apt-get install libxml-parser-perl
On mandriva / mandrake systems, a similarly named package should exist.
1.2 Does the installer set PYTHONPATH?
Not visibly. When you set up your shell via
. sparx.setpath
only one directory is added to your PATH. The shell scripts found in that directory internally set PYTHONPATH and some others before doing their work.
If you really want to have a shell session with PATH, PYTHONPATH, etc. set, run sparx.shell.
1.3 The ./configure step issues warnings. How do I fix them?
The warning
WARNING: X header files are missing.
Graphical install will not work.indicates that your system is missing some development packages.
To get them on debian/ubuntu, use apt-get install libxt6 libxt-dev.
The warnings
WARNING: libXi not found.
python/opengl binding will not work.and
WARNING: libXmu not found.
python/opengl binding will not work.indicate that your system is missing some development packages.
Note that these are warnings; only some opengl-using parts of eman2 will be disabled. The sparx core is not affected.
1.3.1 On fedora core
On a fedora core 6 system, the extra packages needed are
libXmu-1.0.2-5 libXmu-devel-1.0.2-5 libXi-1.0.1-3.1 libXi-devel-1.0.1-3.1
Your redhat system should have similarly named packages on the distribution cd/dvd.
If your system has 'yum' installed, just use
yum search libXmu
to get a listing.
1.3.2 On Debian
The missing packages are installed via
apt-get install libxi6 libxi-dev libxmu-dev m4
1.4 How could I set up the environment for my sparx/eman2 scripts?
The installer provides scripts to do this.
1.4.1 Method One
If you have a script you want to run with the correct environment settings, without changing anything in your interactive shell, you can use sparx.genwrap:
0:$ sparx.genwrap
Usage:
sparx.genwrap original-command new-name
Produce a wrapper for <original-command> that includes PATH,
LD_LIBRARY_PATH, etc. settings needed to access the SPARX tools.So, try
sparx.genwrap /path/to/your/script myscript
Then,
myscript
is a new command (found in \$SPXROOT/bin) with correct settings.
Advantages:
- new scripts do not change the environment (so everything else continues to work)
Drawbacks:
- need a wrapper for every new script
1.4.2 Method Two
If you just want to set up your current session's environment, use the command sparx.shell.
This runs a new shell (bash), with all paths set up for sparx.
For example, the following shows what python version is used by the python command:
0:$ which python /net/cci/hohn/redhat-8.0/usr/local/bin/python hohn@hooknose ~/w/d/l3-dev/l3lang 0:$ sparx.shell hohn@hooknose ~/w/d/l3-dev/l3lang 0:$ which python /net/hooknose/scratch1/hohn/t2/sparx-bin/usr/bin/python
However, running applications installed by the Operating System from this shell may fail (they may pick up incompatible libraries).
1.4.3 Method Three
If you are just experimenting and you do not need to share scripts with others yet, the long form
$ sparx.python script.py
can be used.
The advice is:
- use methods two and three for development
- when you're happy with your script, use method one to isolate it
- don't send scripts to others until they work with method one
1.5 I cannot run EMAN2/SPARX scripts
When I try to run e.g. e2display.py, it complains:
ImportError: .../eman2/install/lib/libEM2.so: undefined symbol: gsl_wavelet_bspline
You're getting the wrong gsl library (from your system). Try this:
sparx.python $SPXROOT/eman2/install/bin/e2display.py filename
If this works, you need to wrap the scripts in question.
For a single script, use sparx.genwrap, e.g.:
. ./sparx.setpath 0:$ sparx.genwrap $SPXROOT/eman2/install/bin/e2display.py e2display.py ==== Creating .../sparx-bin/bin/e2display.py ====
For entire directories, use sparx.genwrap-dir, e.g.:
. ./sparx.setpath sparx.genwrap-dir $SPXROOT/eman2/install/bin ""
This simply wraps all executables in the chosen directory.
To verify, type
which e2display.py
This should end in .../bin/e2display.py without eman2 in the output.
Type
sparx.genwrap-dir
for help.
1.6 I get an MPI error
Problem:
After I run ./install and the updates, the sparx console gives an "Importerror: no module named mpi" and does not work.
Fix: This is a design choice by the sparx developers, assuming that mpi (and pympi) are present.
To fix this, open the file
$SPXROOT/sparx/libpy/global_def.py
and change the line
MPI = True
to
MPI = False
where \$SPXROOT is your installation prefix (as set in the ./configure step).
