When I try to run the sample programs for GPIO, I get the message " GPIO.setmode(GPIO.BCM) AttributeError: 'module' object has no attribute 'setmode'.
When I do a dir or help on the module it only shows :
>>> dir(GPIO) ['IN', 'InvalidDirectionException', 'InvalidPinException', 'OUT', 'WrongDirectionException', '_ExportedIds', '_GPIO_PINS', '_GetValidId', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_unexport', 'atexit', 'input', 'os', 'output', 'setup']
I have removed and re-installed Python-dev and the GPIO update with no help.
However, I have installed Python 3 and am able to get the GPIO module working properly there.
I downloaded the RPi.GPIO bundle directly from https://pypi.python.org/pypi/RPi.GPIO, unpacked it and loaded it for both python and python3 using the install script provided.
python3 worked, but python still didn't support the functions required.
Here is the python3 dir result:
['ALT0', 'BCM', 'BOARD', 'BOTH', 'FALLING', 'HIGH', 'IN', 'LOW', 'OUT', 'PUD_DOWN', 'PUD_OFF', 'PUD_UP', 'PWM', 'RISING', 'RPI_REVISION', 'VERSION', '__doc__', '__file__', '__name__', '__package__', 'add_event_callback', 'add_event_detect', 'cleanup', 'event_detected', 'gpio_function', 'input', 'output', 'remove_event_detect', 'setmode', 'setup', 'setwarnings', 'wait_for_edge']
I've run up updates and re-installed, but no luck.
It's probably something really simple, but I don't have a clue at this point.. Anyone have any suggestions?