ImportError: No module named scrollphat on a fresh jessie installation

Hello, guys,

Really loving your service and products up until now! :)

I just received the rPi zero with your scroll pHAT. Tried this on an existing raspbian (wheezy) and on a fresh one (jessie) both failed with the same error:
ImportError: No module named scrollphat

This is even after the successful execution and installation of the supposed module:

curl -sS get.pimoroni.com/scrollphat | bash

Installing collected packages: scrollphat
  Running setup.py install for scrollphat

    warning: manifest_maker: MANIFEST.in, line 5: 'recursive-include' expects <dir> <pattern1> <pattern2> ...

Successfully installed scrollphat
Cleaning up...

......................

Examples copied to /home/pi/Pimoroni/scrollphat/

Checking additional software requirements...
Found!

All done!

Enjoy your new Scroll pHAT!


here is some more info:

ls /dev/i2c*
/dev/i2c-1

lsmod
Module Size Used by
arc4 1956 2
rt73usb 24322 0
rt2x00usb 11912 1 rt73usb
rt2x00lib 47782 2 rt73usb,rt2x00usb
mac80211 595686 2 rt2x00lib,rt2x00usb
cfg80211 479279 2 mac80211,rt2x00lib
rfkill 21508 2 cfg80211
bcm2835_gpiomem 3703 0
bcm2835_rng 2207 0
snd_bcm2835 22502 3
snd_pcm 92829 1 snd_bcm2835
snd_timer 22164 1 snd_pcm
snd 67534 9 snd_bcm2835,snd_timer,snd_pcm
uio_pdrv_genirq 3526 0
uio 10078 1 uio_pdrv_genirq
i2c_bcm2708 5988 0
i2c_dev 6386 0
fuse 86348 3
ipv6 358702 24

uname -a
Linux raspberrypi 4.1.18+ #846 Thu Feb 25 14:11:56 GMT 2016 armv6l GNU/Linux

cat /etc/os-*
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL=“http://www.raspbian.org/RaspbianBugs

hum, I know we were due to push a new version of the lib to pip imminently, seems something went wrong… or maybe it’s something else, we’ll look into it.

try to install manually by cloning the scrollphat repo at https://github.com/pimoroni/scroll-phat and running the following while in the ‘library’ folder:

sudo python setup.py install

(or python3 depending on what you need/want)

Thanks, that did correct this error, but now i get the same error about smbus module.

Doing a search on the error results in guides on enabling I2C on the rPi.

Am I supposed to enable I2C manually?

not if the script worked, which it may not have since python-smbus should have been installed by it too. Did you get any error related to the apt repo not being accessible or anything like that?

Either way, to enable i2c you can use raspi-config, or:

curl -sS get.pimoroni.com/i2c | sudo bash

to install python-smbus, try:

sudo apt-get install python-smbus python3-smbus

SMBus for both python and python3 were already installed and newest version.

The test-all.py script ran ok with python3:
python3 test-all.py

however python test-all.py still returns the smbus module not found error.

Well, at least now I know I can use it with python3 :)