Project

General

Profile

Install Appion Packages » History » Version 21

Jim Pulokas, 05/21/2010 02:01 PM

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