Open a terminal and start python. Enter:
from imp import *
find_module(module)
See if the path name corresponds with where your module was supposed to be installed or if the path name directs to a __init__.py file
For Example, we were trying to install pyfacebook and our code won't load the module.
find_module(module) was resulting in the following output:
(<open file 'facebook.py', mode 'U' at 0xb752d4f0>, 'facebook.py', ('.py', 'U', 1))
However, the module was installed at (found using a find command):
/usr/lib/python
Clearly, when the code was calling from facebook import *, the code was unable to locate __init__.py file and was crashing. To solve the problem, move the files to /usr/lib/python