Project

General

Profile

Install Appion Packages Shared » History » Version 11

Anchi Cheng, 06/03/2013 09:54 AM

1 1 Anchi Cheng
<pre>
2 10 Amber Herold
cd /path/to/myami-VERSION/myami
3 3 Amber Herold
sudo ./pysetup.sh install
4 1 Anchi Cheng
</pre>
5
6 11 Anchi Cheng
That will install each package, and report any failures.  To determine the cause of failure, see the generated log file "pysetup.log".
7
8
h3. alternatively, install a specific package in turn
9
10
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: 
11 1 Anchi Cheng
12
<pre>
13
cd sinedon
14 3 Amber Herold
sudo python setup.py install
15 1 Anchi Cheng
</pre>
16
17
h3. python-site-package-path: where the installed python packages went:
18
19
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:
20
21
Start the python command line from shell:
22
 <pre>python</pre>
23
24
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.
25 6 Amber Herold
At the python prompt (python>) type:
26
<pre>import sinedon</pre>
27 1 Anchi Cheng
28
29
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
<pre>
31 7 Amber Herold
sinedon.__path__
32 1 Anchi Cheng
['/usr/lib/python2.4/site-packages/sinedon']
33
</pre>
34
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 8 Anchi Cheng
Save this value as an environment variable for use later, for bash:
38 1 Anchi Cheng
<pre>
39
export PYTHONSITEPKG='/usr/lib/python2.4/site-packages'
40
</pre>
41
or C shell
42
<pre>
43
setenv PYTHONSITEPKG '/usr/lib/python2.4/site-packages'
44 2 Scott Stagg
</pre>