Python module installed or not installed?
<p>How can I check if my Python module is successfully installed.</p>

<p>I did:</p>

<pre><code>python setup.py install
</code></pre>

<p>inside the folder where my module was downloaded.</p>

<p>Now, I can see that this resulted in a folder inside this location:</p>

<pre><code>/usr/lib/python2.4/site-packages (I can see my module folder is inside here)
</code></pre>

<p>Now I am using PHP to execute a script from this module:</p>

<pre><code>exec("/usr/bin/python /usr/lib/python2.4/site-packages/MyModule/myModule script.py -v pixfx.xml 2&gt;&amp;1", $output, $return);
</code></pre>

<p>This runs the script.py file but does not load modules which this script requires.
This script has code like this:</p>

<pre><code>#! /usr/bin/env python 
import sys 
import os 
import getopt 
import re 
from myModule.ttLib import TTFont // this is line60 as I have removed comments
</code></pre>

<p>I get this error:</p>

<pre><code>Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MyModule/myModule/script.py", line 60, in ? from myModule.ttLib import TTFont ImportError: No module named myModule.ttLib
</code></pre>

<p>Does this mean there could be some problem with the way my module was installed.
or
How do I check if the module is installed correctly....</p>

<p>I also tried to do this in SSH terminal:</p>

<pre><code>help('modules')
</code></pre>

<p>This listed a load of modules but my module name was missing.</p>

<p>Any help?</p>

<p><em><strong></em></strong> EDIT {Solved} <strong>**</strong>
Reinstalling the module solved it.
Its funny that what I used online SSH tool provided by Mediatemple, it didnt install the module correctly.
Later when I installed using Terminal from my Mac computer, everything worked.</p>

<p>Just thought I will add this for other who might face similar problem.</p>

<p>Thanks</p>
