Python module not working (not able to import) even after including it in PATH variable
Question: I have one testing module that I want to use for android testing. I have the
files but there is no installation file for it, so I added the module to PATH
variable, even then it doesn't work I try to import it.

Any way to make it work. Do I have to paste them in Python folder only (and
what it the Python file location). In windows, I use to paste all the files in
Python folder and everything works perfectly fine. Here in Ubuntu I'm not able
to find the location so I added it in PATH.

Any way out! Any help is appreciated.

Cheers

Some details: Python version: 2.7.2, Ubuntu 11.10 OS, Python module is in
file/folder format with no "setup.py" file to install, Location of module
already in PATH variable, Everything else in Python is working beside that
module, same worked in Windows XP with Python 2.7.2 after copy pasting.


Answer: `PATH` is for executables, `PYTHONPATH` is for Python modules.

You can also start your script with:

    
    
    import sys
    sys.path.append('/path/to/directory')
    import your_module
    

Where `/path/to/directory/your_module.py` is the file you're importing.

The normal location for Python modules is in `/usr/lib/pythonX.X/site-
packages`. For installing stuff as a user
[virtualenv](http://pypi.python.org/pypi/virtualenv) is great.

