0

ImportError working with LCD and Beaglebone
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ImportError working with LCD and Beaglebone

by robcj07 on Tue Nov 07, 2017 2:47 am

I recently install de LCD library for python from this tutorial: https://learn.adafruit.com/character-lcd-with-raspberry-pi-or-beaglebone-black/usage and everything seemed to be right but when running the char_lcd.py script i get the following error:
Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~/Adafruit_Python_CharLCD/examples# python char_lcd.py
Traceback (most recent call last):
  File "char_lcd.py", line 5, in <module>
    import Adafruit_CharLCD as LCD
  File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/__init__.py", line 1, in <module>
  File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 23, in <module>
ImportError: No module named Adafruit_GPIO
Other related questions in the forum are intended for RaspberryPi and other versions of python. I'm using python 2.7.9.
Thanks.

robcj07
 
Posts: 9
Joined: Fri Jul 14, 2017 6:44 pm

Re: ImportError working with LCD and Beaglebone

by drewfustini on Tue Nov 07, 2017 2:08 pm

I believe you'll need to install Adafruit_GPIO. Please run this command:

sudo pip install Adafruit_GPIO

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: ImportError working with LCD and Beaglebone

by robcj07 on Tue Nov 07, 2017 6:02 pm

I'm afraid that doesn't solve the problem. Seems there is not such distribution,
Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~# sudo pip install Adafruit_GPIO
Collecting Adafruit_GPIO
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb6117750>: Failed to establish a new connection: [Errno 111] Connection refused',)': /simple/adafruit-gpio/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb6117710>: Failed to establish a new connection: [Errno 111] Connection refused',)': /simple/adafruit-gpio/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb6117ff0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /simple/adafruit-gpio/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb61176d0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /simple/adafruit-gpio/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb61170d0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /simple/adafruit-gpio/
  Could not find a version that satisfies the requirement Adafruit_GPIO (from versions: )
No matching distribution found for Adafruit_GPIO

robcj07
 
Posts: 9
Joined: Fri Jul 14, 2017 6:44 pm

Re: ImportError working with LCD and Beaglebone

by drewfustini on Wed Nov 08, 2017 4:02 am

It looks like there may be a network connectivity issue effecting pip.

Please try installing Adafruit_GPIO from the repo:
https://github.com/adafruit/Adafruit_Python_GPIO

Code: Select all | TOGGLE FULL SIZE
sudo apt-get update
sudo apt-get install build-essential python-pip python-dev python-smbus git
git clone https://github.com/adafruit/Adafruit_Python_GPIO.git
cd Adafruit_Python_GPIO
sudo python setup.py install

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.