-1

Adafruit LED backpack Am I being stupid (probably yes) I'm after python 3 versions of this module, every time I download it I get the python 2.7 versions

getting my module from

git clone https://github.com/adafruit/Adafruit_Python_LED_Backpack.git

I'm doing this on a raspberry pi

the python 2 version works fine but my program is written in python 3

new error I'm getting is:

Traceback (most recent call last): File "/home/pi/Adafruit_Python_LED_Backpack/matrix8x16_test.py", line 37, in display.begin() File "/home/pi/Adafruit_Python_LED_Backpack/Adafruit_LED_Backpack/HT16K33.py", line 53, in begin self._device.writeList(HT16K33_SYSTEM_SETUP | HT16K33_OSCILLATOR, []) File "/usr/local/lib/python3.4/dist-packages/Adafruit_GPIO/I2C.py", line 127, in writeList self._bus.write_i2c_block_data(self._address, register, data) File "/usr/local/lib/python3.4/dist-packages/Adafruit_PureIO/smbus.py", line 274, in write_i2c_block_data self._device.write(data) OSError: [Errno 5] Input/output error

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

1 Answers1

0

this package seems to be compatible between both python 2 & 3.

after cloning the package, when you want to install it in python interpreter, execute this command:

sudo python -3 setup.py install

'-3' means running on python 3.

SMFSW
  • 286
  • 1
  • 2
  • 10
  • Hi thanks for that, however I've tried that and it still seems to be installing the python 2 version.................. – GrifferScott Mar 23 '17 at 19:48
  • is there some way an rpi is remembering my installs................., I'm getting annoyed, such a simple process..... when it works. I'm close to reinstalling the o/s – GrifferScott Mar 23 '17 at 19:50
  • 1
    Try to import the package in python 3 terminal. If you manage to import it in py3 terminal, then it's properly installed. Do you have problems using the package in python 3 or is it just that you see in package files stuff mentioning py2. 7? It should be the same files for both python versions? By the way, using 3.5 or 3.6? – SMFSW Mar 23 '17 at 19:57
  • And if you can dump or make a screenshot when you encounter the problem, it may help. – SMFSW Mar 23 '17 at 19:58
  • hi, thanks for that, I now have python 3 programs to play with, however I get another error I don't understand, I've pasted it above – GrifferScott Mar 27 '17 at 18:00
  • ignore that, I forgot to connect the chip...................... hence the input out put error..., sometimes you cant see the wood for the tress. thanks for the help – GrifferScott Mar 27 '17 at 18:19