Beaglebone-Black: Cannot install the Adafruit-BBIO in Arch

1,440 views
Skip to first unread message

JJ

unread,
Nov 23, 2013, 9:31:09 AM11/23/13
to beagl...@googlegroups.com




 pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
  Downloading Adafruit_BBIO-0.0.18.tar.gz
  Running setup.py egg_info for package Adafruit-BBIO
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_root/Adafruit-BBIO/setup.py", line 7
        print "py_compile module missing; installing to %spy_compile.py" %\
                                                                       ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip_build_root/Adafruit-BBIO/setup.py", line 7

    print "py_compile module missing; installing to %spy_compile.py" %\

                                                                   ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/Adafruit-BBIO
Storing complete log in /root/.pip/pip.log



That's the problem, py_compile module is missing.
OS is the latest Arch-Arm.

Don deJuan

unread,
Nov 23, 2013, 9:48:23 AM11/23/13
to beagl...@googlegroups.com
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Well first off if you read the github change that make it clear it is possible for breakage to happen if you use it as development continues.
"
PLEASE NOTE: This library may have breaking changes as development continues. Please read the changelog anytime you update the library!

The PWM Duty Cycle range was reversed in 0.0.15 from 100(off)-0(on) to 0(off)-100(on). Please update your code accordingly.
"

Second did you install python-pip and python-setuptools or did you install python2-pip and python2-setuptools

I just got done compiling around 30 something python and python2 packages on Arch and have not had a single issues relating to a broken python or python2 install.

My guess is you need the python2 related packages. If it is a broken python install I would try reinstalling python and python2 test again. If still borked try creating a new image test again, if borked again report a bunch to archlinuxarm . My guess is there is nothing wrong with the python* packages.

Don deJuan

unread,
Nov 23, 2013, 9:49:12 AM11/23/13
to beagl...@googlegroups.com
On 11/23/2013 06:31 AM, JJ wrote:
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I forgot to mention that you really should be creating a PKGBUILD for installing this as well.

JJ

unread,
Nov 23, 2013, 11:24:46 AM11/23/13
to beagl...@googlegroups.com
I managed to compile BBIO and before that I installed python2 packages.
Now there's a new problem, let's see following code


import Adafruit_BBIO.ADC as ADC


ADC
.setup()
value
= ADC.read("P8_36")
voltage
= value * 1.8 #1.8V
print voltage

It should print the analog pin 5 value, but this error appears:
# python2 voltage.py
Traceback (most recent call last):

 
File "voltage.py", line 3, in <module>
    ADC
.setup()
RuntimeError: Unable to setup ADC system. Possible causes are:
 
- A cape with a conflicting pin mapping is loaded
 
- A device tree object is loaded that uses the same name for a fragment: helper
 

Don deJuan

unread,
Nov 23, 2013, 1:28:13 PM11/23/13
to beagl...@googlegroups.com
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
which arch kernel are you running? You should be on the legacy one for the beagle if you're working with capes also you should make sure you're using dtc-overlay as opposed to dtc.

This post has some information in regards to the device tree and arch linux arm.
http://www.adminempire.com/beaglebone-basics-for-arch-linux/

JJ

unread,
Nov 23, 2013, 2:45:51 PM11/23/13
to beagl...@googlegroups.com
Thank you! I used the latest 3.12 kernel and installed the legacy version. Now my program works fine!
By the way, why doesn't the newest kernel support the capes?

Don deJuan

unread,
Nov 23, 2013, 5:27:57 PM11/23/13
to beagl...@googlegroups.com
3.12 does not have full cape support as of yet. 3.8 gives you all the cape stuff, 3.12 is better with USB and a few other things right now.

William Hermans

unread,
Nov 24, 2013, 4:43:28 AM11/24/13
to beagl...@googlegroups.com
3.12 is just barely ( a month or so ) out of RC status. Just need someone to port the code and device tree files over from 3.8.  Which probably is harder than I made it sound. Not really sure I have not looked at the code on either kernel version.

david germain

unread,
Feb 7, 2014, 12:06:25 PM2/7/14
to beagl...@googlegroups.com
this worked for me 

  1. git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
  2. #set the date and time
  3. /usr/bin/ntpdate -b -s -u pool.ntp.org
  4. #install dependency
  5. opkg update && opkg install python-distutils python-smbus
  6. cd adafruit-beaglebone-io-python
  7. python setup.py install

Reply all
Reply to author
Forward
0 new messages