Discussion:
Python GPIO Error
i***@public.gmane.org
2013-08-02 19:51:54 UTC
Permalink
Greetings. I ssh into my BB_B and I have followed this guide<http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation>and everything works fine. However when I try typing this code to test my
installation it doesn't work:

1. python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO"


I get an error:

***@beaglebone:~/adafruit-beaglebone-io-python# python blink.py Traceback
(most recent call last): File "blink.py", line 1, in <module> import
Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO


***@beaglebone:~/adafruit-beaglebone-io-python# python -c "import
Adafruit_BBIO.GPIO as GPIO; print GPIO"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named GPIO
***@beaglebone:~/adafruit-beaglebone-io-python#

I tried to move along in the guide and typed this code into a new python
file called blink.py:

import Adafruit_BBIO.GPIO as GPIO
import time

GPIO.setup("P8_10", GPIO.OUT)

while True:
GPIO.output("P8_10", GPIO.HIGH)
time.sleep(0.5)
GPIO.output("P8_10", GPIO.LOW)
time.sleep(0.5)



When I try to run blink.py I get a similar error to the one above:

***@beaglebone:~/adafruit-beaglebone-io-python# python blink.py Traceback
(most recent call last): File "blink.py", line 1, in <module> import
Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO


So I know something is up with my GPIO ports but I just do not know what.
Please help me.
Thanks for reading
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
James Ronald
2013-08-02 20:36:41 UTC
Permalink
See if Adafruit_BBIO installs correctly by running following commands
separately:

opkg update

opkg install python-pip python-setuptools python-smbus

pip install Adafruit_BBIO
Post by i***@public.gmane.org
Greetings. I ssh into my BB_B and I have followed this guide<http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation>and everything works fine. However when I try typing this code to test my
1. python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO"
Traceback (most recent call last): File "blink.py", line 1, in <module>
import Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO
Adafruit_BBIO.GPIO as GPIO; print GPIO"
File "<string>", line 1, in <module>
ImportError: No module named GPIO
I tried to move along in the guide and typed this code into a new python
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P8_10", GPIO.OUT)
GPIO.output("P8_10", GPIO.HIGH)
time.sleep(0.5)
GPIO.output("P8_10", GPIO.LOW)
time.sleep(0.5)
Traceback (most recent call last): File "blink.py", line 1, in <module>
import Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO
So I know something is up with my GPIO ports but I just do not know what.
Please help me.
Thanks for reading
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
m***@public.gmane.org
2013-08-21 05:15:08 UTC
Permalink
Changing the current directory should help.

Python is loading Adafruit_BBIO from the current (source) directory, which
only contains the __init__.py file. By changing the current directory, it
will load it from the correct (installed) area, which contains the other
pieces (such as GPIO.so)
Post by i***@public.gmane.org
Greetings. I ssh into my BB_B and I have followed this guide<http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation>and everything works fine. However when I try typing this code to test my
1. python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO"
Traceback (most recent call last): File "blink.py", line 1, in <module>
import Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO
Adafruit_BBIO.GPIO as GPIO; print GPIO"
File "<string>", line 1, in <module>
ImportError: No module named GPIO
I tried to move along in the guide and typed this code into a new python
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P8_10", GPIO.OUT)
GPIO.output("P8_10", GPIO.HIGH)
time.sleep(0.5)
GPIO.output("P8_10", GPIO.LOW)
time.sleep(0.5)
(most recent call last): File "blink.py", line 1, in <module> import
Adafruit_BBIO.GPIO as GPIO ImportError: No module named GPIO
So I know something is up with my GPIO ports but I just do not know what.
Please help me.
Thanks for reading
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Continue reading on narkive:
Search results for 'Python GPIO Error' (Questions and Answers)
4
replies
Python Program Problem?
started 2013-04-15 21:23:20 UTC
programming & design
Loading...