Project

General

Profile

Install Appion Packages » History » Version 25

Eric Hou, 05/26/2010 03:22 PM

1 20 Anchi Cheng
h1. Install Appion/Leginon Packages
2 1 Amber Herold
3 24 Jim Pulokas
h3. Install all the myami python packages _except appion_ using the following script:
4 1 Amber Herold
5
<pre>
6 22 Jim Pulokas
cd /your_download_area
7 21 Jim Pulokas
cd myami
8 25 Eric Hou
./pysetup.sh install
9 21 Jim Pulokas
</pre>
10 1 Amber Herold
11 24 Jim Pulokas
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 7 Neil Voss
13 21 Jim Pulokas
<pre>
14 1 Amber Herold
cd sinedon
15
python setup.py install
16 24 Jim Pulokas
</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 1 Amber Herold
</pre>
25
26
h3. python-site-package-path: where the installed python packages went:
27 19 Amber Herold
28 1 Amber Herold
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 19 Amber Herold
30 11 Neil Voss
Start the python command line from shell:
31 1 Amber Herold
 <pre>python</pre>
32 16 Neil Voss
33 11 Neil Voss
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 1 Amber Herold
 <pre>python> import sinedon</pre>
35
36 16 Neil Voss
37 1 Amber Herold
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 13 Neil Voss
<pre>
39 1 Amber Herold
python> sinedon.__path__
40
['/usr/lib/python2.4/site-packages/sinedon']
41 14 Neil Voss
</pre>
42 16 Neil Voss
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 15 Neil Voss
Save this value for use later, for bash:
46 17 Neil Voss
<pre>
47 15 Neil Voss
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
48
</pre>
49
or C shell
50 17 Neil Voss
<pre>
51 14 Neil Voss
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
52 2 Amber Herold
</pre>
53
54
______
55
56 3 Amber Herold
[[Perform system check|< Perform system check]] | [[Configure leginon.cfg|Configure leginon.cfg >]]
57
58 1 Amber Herold
______