Python script works in librarys examples folder, but not in parent directory
Question: I have a newbie problem. I have a Raspberry Pi 2 computer. I connected DHT11
sensor to GPIO PIN 4. Next, I've installed Adafruit_DHT_python library by
running setup.py file using command:

    
    
    sudo ./setup.py
    

After installation i ran example from /examples folder by:

    
    
    sudo ./AdafruitDHT.py 11 4
    

It works like charm. This scriptis using installed library by importing it:

    
    
    import Adafruit_DHT
    

When i write my own code in examples folder - it works. When I execute this
code from parent folder, it returns this error:

    
    
    ImportError: No module named Raspberry_Pi_2_Driver
    

When I installed this library in my system, should it work from any location
in file system? Also, when i try to execute script in examples folder as
normal user(it have all needed premissions), it returns this error:

    
    
    ImportError: No module named Adafruit_DHT
    


Answer: I had the same issue, just used import sys

import sys sys.path.append("/home/me/mypy")

to the path of the Adafruit_Python_DHT module (replace "/home/me/mypy").
Basically, we just have to tell python where it is. Something isn't installing
properly.

