Project

General

Profile

Install Appion Packages Shared » History » Version 2

Scott Stagg, 06/11/2010 10:08 AM

1 1 Anchi Cheng
h1. Install Appion/Leginon Processing Packages
2
3
h3. Install all the myami python packages _except appion_ using the following script:
4
5
<pre>
6
cd /your_download_area
7
cd myami
8
./pysetup.sh install
9
</pre>
10
11
That will install each package, and report any failures.  To determine the cause of failure, see the generated log file "pysetup.log".  If necessary, you can enter a specific package directory and run the python setup command manually.  For example, if sinedon failed to install, you can try again like this: 
12
13
<pre>
14
cd sinedon
15
python setup.py install
16
</pre>
17
18
h3. Install the appion python package
19
20
The pysetup.py script above did not install the appion package.  Since the appion package includes many executable scripts, it is important that you know where they are being installed.  To prevent cluttering up the /usr/bin directory, you can specify an alternative path, typically /usr/local/bin, or a directory of your choice that you will later add to your PATH environment variable.  Install appion like this:
21
<pre>
22
cd appion
23
python setup.py install --install-scripts=/usr/local/bin
24
</pre>
25
26
h3. python-site-package-path: where the installed python packages went:
27
28
Python installer put the packages you installed into its site-packages directory. This enables all users on the same computer to access them. The easiest way to discover where your installed package is loaded from by python is to load a module from the package using interactive python command lines like this:
29
30
Start the python command line from shell:
31
 <pre>python</pre>
32
33
Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
34
 <pre>python> import sinedon</pre>
35
36
37
If the module is loaded successfully, call the module attribute __path__ (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
38
<pre>
39
python> sinedon.__path__
40
['/usr/lib/python2.4/site-packages/sinedon']
41
</pre>
42
43
In this case, /usr/lib/python2.4/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
44
45
Save this value for use later, for bash:
46
<pre>
47
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
48
</pre>
49
or C shell
50
<pre>
51
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
52
</pre>
53 2 Scott Stagg
54
Finally, you will need to set the the MATLABPATH environment variable in order to get the Appion utilities that use Matlab to work.
55
For bash:
56
<pre>
57
export MATLABPATH=$MATLABPATH:<your_appion_directory>/ace
58
</pre>
59
or C shell
60
<pre>
61
setenv MATLABPATH $MATLABPATH:<your_appion_directory>/ace
62
</pre>