Project

General

Profile

Install Appion Packages Shared » History » Version 4

Amber Herold, 06/15/2010 03:45 PM

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 3 Amber Herold
sudo ./pysetup.sh install
9 1 Anchi Cheng
</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 3 Amber Herold
sudo python setup.py install
16 1 Anchi Cheng
</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 3 Amber Herold
sudo python setup.py install --install-scripts=/usr/local/bin
24 1 Anchi Cheng
</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 4 Amber Herold
 python> 
35
<pre>import sinedon</pre>
36 1 Anchi Cheng
37
38
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
39
<pre>
40
python> sinedon.__path__
41
['/usr/lib/python2.4/site-packages/sinedon']
42
</pre>
43
44
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.
45
46
Save this value for use later, for bash:
47
<pre>
48
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
49
</pre>
50
or C shell
51
<pre>
52
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
53
</pre>
54 2 Scott Stagg
55
Finally, you will need to set the the MATLABPATH environment variable in order to get the Appion utilities that use Matlab to work.
56
For bash:
57
<pre>
58
export MATLABPATH=$MATLABPATH:<your_appion_directory>/ace
59
</pre>
60
or C shell
61
<pre>
62
setenv MATLABPATH $MATLABPATH:<your_appion_directory>/ace
63
</pre>