Install Appion Packages » History » Version 5
  Neil Voss, 05/12/2010 10:03 AM 
  
| 1 | 1 | Amber Herold | h1. Install Appion Packages  | 
|---|---|---|---|
| 2 | |||
| 3 | h3. Install the package in _each folder_ with commands like these  | 
||
| 4 | |||
| 5 | *TODO: move these into a single installer, ask Jim*  | 
||
| 6 | |||
| 7 | <pre>  | 
||
| 8 | cd /your_download_area/myami/leginon  | 
||
| 9 | 4 | Neil Voss | sudo python setup.py install  | 
| 10 | 1 | Amber Herold | |
| 11 | cd ../pyami  | 
||
| 12 | 4 | Neil Voss | sudo python setup.py install  | 
| 13 | 5 | Neil Voss | cd ../pyscope  | 
| 14 | 4 | Neil Voss | sudo python setup.py install  | 
| 15 | 1 | Amber Herold | cd ../sinedon  | 
| 16 | 4 | Neil Voss | sudo python setup.py install  | 
| 17 | 1 | Amber Herold | cd ../numextension  | 
| 18 | 4 | Neil Voss | sudo python setup.py install  | 
| 19 | 1 | Amber Herold | cd ../libcv  | 
| 20 | 4 | Neil Voss | sudo python setup.py install  | 
| 21 | 1 | Amber Herold | cd ../imageviewer  | 
| 22 | 4 | Neil Voss | sudo python setup.py install  | 
| 23 | 1 | Amber Herold | </pre>  | 
| 24 | |||
| 25 | h3. python-site-package-path: where the installed python packages went:  | 
||
| 26 | |||
| 27 | Python installer put the packages you installed to its site-packages directory. This enable all users on the same computer to access them. The easiest way to find where your installed package is called by python is to load a module from the package using interactive python command lines like this:  | 
||
| 28 | |||
| 29 | * Start python command line from shell  | 
||
| 30 | <pre>> python</pre>  | 
||
| 31 | |||
| 32 | * 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.  | 
||
| 33 | <pre>python> import sinedon</pre>  | 
||
| 34 | |||
| 35 | |||
| 36 | * 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  | 
||
| 37 | <pre>  | 
||
| 38 | python> sinedon.__path__  | 
||
| 39 | |||
| 40 | RETURNS, For example,  | 
||
| 41 | python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'>  | 
||
| 42 | </pre>  | 
||
| 43 | In this case, /usr/lib/python2.5/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.  | 
||
| 44 | 2 | Amber Herold | |
| 45 | ______  | 
||
| 46 | |||
| 47 | [[Perform system check|< Perform system check]] | [[Configure leginon.cfg|Configure leginon.cfg >]]  | 
||
| 48 | 3 | Amber Herold | |
| 49 | ______  |