resolved - Can't install BBB.GPIO

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
aeva_ntsc
 
Posts: 4
Joined: Sun Jul 07, 2013 8:49 am

resolved - Can't install BBB.GPIO

Post by aeva_ntsc »

In attempting to install the python GPIO library on a fresh install of Angstrom on a BBB fails.

With pip, I get this error:

Code: Select all

root@beaglebone:~# pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Adafruit-BBIO
No distributions at all found for Adafruit-BBIO
Storing complete log in /home/root/.pip/pip.log
Just to be sure its connected to the internet, and that pypi.python.org is actually online...

Code: Select all

root@beaglebone:~# ping -c 3 pypi.python.org
PING global-ssl.fastly.net (199.27.73.185) 56(84) bytes of data.
64 bytes from 199.27.73.185: icmp_req=1 ttl=54 time=20.3 ms
64 bytes from 199.27.73.185: icmp_req=2 ttl=54 time=19.6 ms
64 bytes from 199.27.73.185: icmp_req=3 ttl=54 time=19.8 ms

--- global-ssl.fastly.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10128ms
rtt min/avg/max/mdev = 19.698/19.972/20.395/0.344 ms
Ok, lets try installing something else...

Code: Select all

root@beaglebone:~# pip install lxml  
Downloading/unpacking lxml
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement lxml
No distributions at all found for lxml
Storing complete log in /home/root/.pip/pip.log
Ok, thats weird. Lets have a gander at that log...

Code: Select all

------------------------------------------------------------
/usr/bin/pip run on Sat Jan  1 00:29:25 2000
Downloading/unpacking lxml

  Getting page https://pypi.python.org/simple/lxml/
  Could not fetch URL https://pypi.python.org/simple/lxml/: <urlopen error [Errno -2] Name or service not known>
  Will skip URL https://pypi.python.org/simple/lxml/ when looking for download links for lxml
  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: <urlopen error [Errno -2] Name or service not known>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for lxml
  Cannot fetch index base URL https://pypi.python.org/simple/

  URLs to search for versions for lxml:
  * https://pypi.python.org/simple/lxml/
  Getting page https://pypi.python.org/simple/lxml/
  Could not fetch URL https://pypi.python.org/simple/lxml/: <urlopen error [Errno -2] Name or service not known>
  Will skip URL https://pypi.python.org/simple/lxml/ when looking for download links for lxml
  Could not find any downloads that satisfy the requirement lxml

No distributions at all found for lxml

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1026, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/site-packages/pip/index.py", line 171, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for lxml
Wait, what? Ok, screw it, trying manual installation instead...

Code: Select all

root@beaglebone:~/adafruit-beaglebone-io-python# python setup.py install
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.45.tar.gz
Traceback (most recent call last):
  File "setup.py", line 28, in <module>
    distribute_setup.use_setuptools()
  File "/home/root/adafruit-beaglebone-io-python/distribute_setup.py", line 162, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "/home/root/adafruit-beaglebone-io-python/distribute_setup.py", line 131, in _do_download
    to_dir, download_delay)
  File "/home/root/adafruit-beaglebone-io-python/distribute_setup.py", line 211, in download_setuptools
    src = urlopen(url)
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
o___o

Ok, well that didn't work, lets try downloading the package from pip manually...

Code: Select all

root@beaglebone:~# wget http://pypi.python.org/packages/source/A/Adafruit_BBIO/Adafruit_BBIO-0.0.8.tar.gz
wget: bad address 'pypi.python.org'
What the internet?!?!?! I can download it fine on my laptop, but not on my BBB!

Does *anything* work?

Code: Select all

root@beaglebone:~# wget http://pirateradiotheater.org/
Connecting to pirateradiotheater.org (97.107.139.130:80)
index.html           100% |**************************************|  5612   0:00:00 ETA
Is there something wrong with PIP?

edit: The plot thickens...

Code: Select all

root@beaglebone:~# echo nameserver 8.8.8.8 > /etc/resolv.conf
root@beaglebone:~# pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for Adafruit-BBIO
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO
  Could not find any downloads that satisfy the requirement Adafruit-BBIO
No distributions at all found for Adafruit-BBIO
Storing complete log in /home/root/.pip/pip.log
Contents of that log file are now:

Code: Select all

------------------------------------------------------------
/usr/bin/pip run on Sat Jan  1 00:01:21 2000
Downloading/unpacking Adafruit-BBIO

  Getting page https://pypi.python.org/simple/Adafruit_BBIO/
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>

  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO

  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>

  Will skip URL https://pypi.python.org/simple/ when looking for download links for Adafruit-BBIO

  Cannot fetch index base URL https://pypi.python.org/simple/

  URLs to search for versions for Adafruit-BBIO:
  * https://pypi.python.org/simple/Adafruit_BBIO/
  Getting page https://pypi.python.org/simple/Adafruit_BBIO/
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>

  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO

  Could not find any downloads that satisfy the requirement Adafruit-BBIO

No distributions at all found for Adafruit-BBIO

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1026, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/site-packages/pip/index.py", line 171, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for Adafruit-BBIO
edit2:
Manual install works now. Durp.

samuelj
 
Posts: 17
Joined: Sun Jun 09, 2013 3:56 am

Re: resolved - Can't install BBB.GPIO

Post by samuelj »

Wow, thanks for documenting everything!

This got me to thinking about how the experience on Debian is so much different. The Adafruit tutorials seem to have only been tested on the armhf.com Ubuntu, but I've been running the Adafruit BBIO library on Debian and it all seems to work just as well. Since I use Wheezy on my laptop and desktop, it made more sense to me. I use python to data log and perform io, so I didn't even use the node.js server that was the hallmark of the beaglebone black that came with the custom angstrom image on the eMMC.

I've also read that you can't perform update functions on the angstrom build as it bricks the install.

Are there any other reasons to run angstrom?

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: resolved - Can't install BBB.GPIO

Post by akamediasystem »

Hi, I had a very similar problem when trying to run

Code: Select all

pip install Adafruit_BBIO
and I got:

Code: Select all

root@beaglebone:/# pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for Adafruit-BBIO
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/Adafruit_BBIO/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
  Will skip URL https://pypi.python.org/simple/Adafruit_BBIO/ when looking for download links for Adafruit-BBIO
  Could not find any downloads that satisfy the requirement Adafruit-BBIO
No distributions at all found for Adafruit-BBIO
Storing complete log in /home/root/.pip/pip.log

root@beaglebone:~# git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
Cloning into adafruit-beaglebone-io-python...
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection refused

root@beaglebone:~# echo nameserver 8.8.8.8
nameserver 8.8.8.8
root@beaglebone:~# echo nameserver 8.8.8.8 > /etc/resolv.conf
root@beaglebone:~# pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Adafruit-BBIO
No distributions at all found for Adafruit-BBIO
Storing complete log in /home/root/.pip/pip.log
I got the same error messages, and a manual install also didn't work (as you can see from above excerpt)

I was on a corporate firewalled connection, though, and I had a suspicion that maybe weird port numbers were being blocked or refused.

Switching networks to a non-firewalled connection resulted in

Code: Select all

pip install Adafruit_BBIO
working without issue.

Hope this helps,

AKA

User avatar
ttu_don
 
Posts: 53
Joined: Mon Mar 17, 2014 12:36 am

Re: resolved - Can't install BBB.GPIO

Post by ttu_don »

Thanks for the posting! I'm having trouble getting the python IO libraries installed as well...

I have a Beaglebone Black with the latest Angstrom distro on an SD card to boot off of. I tried installing Ubuntu Debian & couldn't get the Adafruit GPIO libraries installed, so I am trying to get them installed using Angstrom. I am not behind a firewall (home network) but I get the following error when I run

Code: Select all

pip install Adafruit_BBIO
"unable to execute arm-angstrom-linux-gnueabi-gcii: No such file or directory"

I know the python-pip python-setuptools & python-smbus are up to date, but for some reason I can't get the GPIO libraries installed...

Suggestions?

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: resolved - Can't install BBB.GPIO

Post by akamediasystem »

I'm sorry to say I don't know what that error could mean. No doubt someone who does will chime in right after me ;-)

I do remember having great difficulty understanding error messages I got when I tried to pip install Adafruit_BBIO before making sure the system time was correct.

Have you done anything similar to what is described here? http://derekmolloy.ie/automatically-set ... using-ntp/

I know the Adafruit library mentions running an ntp time setting command before pip installing, but I have found that following Derek Molloy's instructions before I pip-install anything is a good idea.

Hope this helps,

AKA

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”