Install Appion Packages » History » Version 20
Anchi Cheng, 05/18/2010 07:46 PM
1 | 20 | Anchi Cheng | h1. Install Appion/Leginon Packages |
---|---|---|---|
2 | 1 | Amber Herold | |
3 | h3. Install the package in _each folder_ with commands like these |
||
4 | |||
5 | |||
6 | <pre> |
||
7 | 9 | Neil Voss | cd /your_download_area/ |
8 | |||
9 | cd myami/leginon |
||
10 | 4 | Neil Voss | sudo python setup.py install |
11 | 1 | Amber Herold | |
12 | cd ../pyami |
||
13 | 4 | Neil Voss | sudo python setup.py install |
14 | 8 | Neil Voss | |
15 | 5 | Neil Voss | cd ../pyscope |
16 | 4 | Neil Voss | sudo python setup.py install |
17 | 8 | Neil Voss | |
18 | 1 | Amber Herold | cd ../sinedon |
19 | 4 | Neil Voss | sudo python setup.py install |
20 | 8 | Neil Voss | |
21 | cd ../imageviewer |
||
22 | sudo python setup.py install |
||
23 | |||
24 | cd ../appion |
||
25 | 10 | Neil Voss | sudo python setup.py install --install-scripts=/usr/local/bin |
26 | 8 | Neil Voss | |
27 | #binary packages |
||
28 | |||
29 | 4 | Neil Voss | cd ../numextension |
30 | 1 | Amber Herold | python setup.py build |
31 | 6 | Neil Voss | sudo python setup.py install |
32 | 8 | Neil Voss | |
33 | 4 | Neil Voss | cd ../libcv |
34 | 1 | Amber Herold | python setup.py build |
35 | sudo python setup.py install |
||
36 | 8 | Neil Voss | |
37 | 7 | Neil Voss | cd ../appion/radermacher |
38 | 6 | Neil Voss | python setup.py build |
39 | 4 | Neil Voss | sudo python setup.py install |
40 | 1 | Amber Herold | </pre> |
41 | |||
42 | h3. python-site-package-path: where the installed python packages went: |
||
43 | |||
44 | 19 | 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: |
45 | 1 | Amber Herold | |
46 | 19 | Amber Herold | Start the python command line from shell: |
47 | 11 | Neil Voss | <pre>python</pre> |
48 | 1 | Amber Herold | |
49 | 16 | 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. |
50 | 11 | Neil Voss | <pre>python> import sinedon</pre> |
51 | 1 | Amber Herold | |
52 | |||
53 | 16 | Neil Voss | 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 |
54 | 1 | Amber Herold | <pre> |
55 | 13 | Neil Voss | python> sinedon.__path__ |
56 | 1 | Amber Herold | ['/usr/lib/python2.4/site-packages/sinedon'] |
57 | </pre> |
||
58 | 14 | Neil Voss | |
59 | 16 | Neil Voss | 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. |
60 | |||
61 | Save this value for use later, for bash: |
||
62 | 15 | Neil Voss | <pre> |
63 | 17 | Neil Voss | export PYTHONSITEPKG='/usr/lib/python2.4/site-packages' |
64 | 15 | Neil Voss | </pre> |
65 | or C shell |
||
66 | <pre> |
||
67 | 17 | Neil Voss | setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages' |
68 | 14 | Neil Voss | </pre> |
69 | 2 | Amber Herold | |
70 | ______ |
||
71 | |||
72 | [[Perform system check|< Perform system check]] | [[Configure leginon.cfg|Configure leginon.cfg >]] |
||
73 | 3 | Amber Herold | |
74 | ______ |