raspberry pi2 - Python 2.7 - Cannot Import GPIOZERO -


i new raspberrypi, debian , python.

i have configured raspberry pi 2 model b v1.1 recommendations available many many helpfull websites , people. however, when want start basic project based using gpiozero control buttons , led's not able use the: "from gpiozero import led, button" command. output reports following:

> traceback (most recent call last): > file "", line 1, in  > file "/usr/lib/python2.7/dist-packages/gpiozero/init.py", line 57, in  > .devices import ( > file "/usr/lib/python2.7/dist-packages/gpiozero/devices.py", line 38, in  > .pins.rpigpio import rpigpiopin > file "/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py", line 27, in  > class rpigpiopin(pin): >   > ***file "/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py", line 55, > in rpigpiopin 'i2c': gpio.i2c, >   > attributeerror: 'module' object has no attribute 'i2c'*** 

can please shed light on , let me know how out of situation?

thanks much

thanks of suggestions , assistance - error was loading python command "python" instead of "python3". once ran "python3" worked.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -