UCSF PyEM on CentOS 7

Another software package that I don’t know exactly what it does needs to be installed. I was told it is used to edit and correct the output of the standard EM programs, but I never tried to do something like that. I guess first I need to get some data, but that’s another problem. So I was given a GitHub repository for UCSF PyEM and asked to make a module for it. I download the zip, unzip it in a convenient place and try to run one of the python scrips. The error (expected) read

pathos importerror no module named multiprocessing

So I try to fix it with pip. I was told it needs panda also, meaning that at the end I do

pip install pathos
...bla bla bla...
Successfully installed dill-0.2.6 
multiprocess-0.70.5 pathos-0.2.0 pox-0.2.3 ppft-
pip install panda...bla bla bla..
Successfully installed panda-0.3.1 requests-2.13.0

So far so good. Let’s make a module. I know from the error when trying to run a script

python recenter.py 
Traceback (most recent call last):
 File "recenter.py", line 10, in <module>
 from EMAN2 import EMData, Vec3f
ImportError: No module named EMAN2

that I need EMAN2 to make some use of it. So I copy my already existing eman2 module and modify it accordingly. This is how the module looks like:

## modules eman2/eman2-pyem
## modulefiles/eman2/eman2-pyem module
proc ModulesHelp { } {
 global version modroot
puts stderr "eman2/eman2-pyem- sets the environment for using pyem"

module-whatis "Sets the environment for using EMAN 2 2016.2"

# for Tcl script use only
set topdir /usr/local/EMAN2_2016.2
set version 2016.2
set sys linux86

# additional env variables 
set emandir /usr/local/EMAN_1.9

set pythonlib /usr/local/EMAN2_2016.2/lib
set pythonbin /usr/local/EMAN2_2016.2/bin

setenv PYTHONPATH $pythonlib:$pythonbin:$topdir

setenv EMAN2DIR $topdir
setenv EMANDIR $emandir

prepend-path PATH $topdir/include
prepend-path PATH $topdir/bin
prepend-path MANPATH $topdir/man
prepend-path LD_LIBRARY_PATH $topdir/lib: /usr/local/EMAN_1.9/lib

Now when I run as an user, I get this output:

python recenter.py
usage: recenter.py [-h] [--loglevel LOGLEVEL] 
[--mask MASK] [--nproc NPROC]
 [--prefix PREFIX] [--translations TRANSLATIONS]
 input output
recenter.py: error: too few arguments

So I guess it’s fine. As usual, time to wait for the user’s input. Let’s see if all is OK.



About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits, centos, linux, slurm. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s