Install Appion Packages Shared » History » Revision 2
Revision 1 (Anchi Cheng, 06/03/2010 12:55 PM) → Revision 2/15 (Scott Stagg, 06/11/2010 10:08 AM)
h1. Install Appion/Leginon Processing Packages
h3. Install all the myami python packages _except appion_ using the following script:
<pre>
cd /your_download_area
cd myami
./pysetup.sh install
</pre>
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:
<pre>
cd sinedon
python setup.py install
</pre>
h3. Install the appion python package
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:
<pre>
cd appion
python setup.py install --install-scripts=/usr/local/bin
</pre>
h3. python-site-package-path: where the installed python packages went:
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:
Start the python command line from shell:
<pre>python</pre>
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.
<pre>python> import sinedon</pre>
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
<pre>
python> sinedon.__path__
['/usr/lib/python2.4/site-packages/sinedon']
</pre>
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.
Save this value for use later, for bash:
<pre>
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
</pre>
or C shell
<pre>
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
</pre>
Finally, you will need to set the the MATLABPATH environment variable in order to get the Appion utilities that use Matlab to work.
For bash:
<pre>
export MATLABPATH=$MATLABPATH:<your_appion_directory>/ace
</pre>
or C shell
<pre>
setenv MATLABPATH $MATLABPATH:<your_appion_directory>/ace
</pre>