RPi3 and Sense Hat. Missing Module




I am trying to dockify my app on RPi3 which controls the Sense Hat. On the resin.io logs it says can’t find module RTIMU. How can I resolve the problem?

And what is the difference between installing dependencies vs install requirements in the Docker Template?


hey @gh_touloupas can you post your dockerfile here? What language are you trying to use the sensehat in? we have a few examples:

FROM resin/%%RESIN_MACHINE_NAME%%-python

RUN apt-get update && apt-get install -yq \
    python3=3.4.2-2 sense-hat raspberrypi-bootloader i2c-tools && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

COPY ./requirements.txt /requirements.txt

RUN apt-get update && \
apt-get install -yq --no-install-recommends \
  build-essential libssl-dev libffi-dev libyaml-dev python3-dev python3-pip && \
pip3 install -r requirements.txt && \
apt-get remove \
  build-essential libssl-dev libffi-dev libyaml-dev python3-dev python3-pip \
&& apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/*

COPY . ./


CMD modprobe i2c-dev && python src/main.py


Looks like you may be actually just missing RTIMU? Just saw this: https://github.com/RPi-Distro/python-sense-hat/issues/58
You could try adding the install steps from https://github.com/RPi-Distro/RTIMULib/tree/master/Linux/python to your Dockerfile.

It’s also potentially problematic that you’re starting from a python base image and installing a specific python - might be better to start from plain resin/raspberrypi3-debian:jessie ?


Thanks for helping. Also I have one more question. What’s the difference between installing from requirements.txt and installing dependencies on a DockerFile? I am trying to find out more about resin.io.


There is no difference although using requirements.txt is nicer as it separates any dependencies from your Dockerfile.


Thanks everyone, you were very helpful. Consider this topic closed.