DaddyTheRunner
Posts: 8
Joined: Sun Sep 13, 2015 11:56 pm

Sense Hat missing RTIMU module

Sun Oct 23, 2016 5:49 pm

Help! I recently upgraded the GNU R packages from 3.1.1 to 3.3.1. To do this, I had to add the stretch distribution to my /etc/apt/sources.list file. In the process of successfully upgrading GNU R, apt also chose to install an upgraded version of Python3. Now when I try to use the Sense Hat module with Python3, I get the following error message:

Code: Select all

Python 3.5.2+ (default, Sep 22 2016, 12:18:14) 
[GCC 6.1.1 20160802] on linux
Type "copyright", "credits" or "license()" for more information.
>>> from sense_hat import SenseHat
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from sense_hat import SenseHat
  File "/usr/lib/python3/dist-packages/sense_hat/__init__.py", line 2, in <module>
    from .sense_hat import SenseHat, SenseHat as AstroPi
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 10, in <module>
    import RTIMU  # custom version
ImportError: No module named 'RTIMU'
>>>
However, pip3 indicates that RTIMUlib 7.2.1 is installed:

Code: Select all

[email protected]:~/SenseHat $ pip3 freeze
Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
Pillow==3.3.1
RTIMULib==7.2.1
Werkzeug==0.9.6
chardet==2.3.0
codebug-i2c-tether==0.2.3
codebug-tether==0.7.0
colorama==0.3.2
cryptography==1.5.2
gpiozero==1.3.1
html5lib==0.999
idna==2.1
itsdangerous==0.24
mcpi==0.1.1
numpy==1.11.2
picamera==1.12
picraft==0.6
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pyOpenSSL==16.1.0
pyasn1==0.1.9
pygobject==3.22.0
pyinotify==0.9.4
pyserial==2.6
python-apt==1.1.0b5
python-debian==0.1.27
requests==2.4.3
sense-emu==1.0
sense-hat==2.2.0
six==1.8.0
smbus==1.1
twython==3.1.2
urllib3==1.9.1
wheel==0.24.0
What do I need to do to get the Sense Hat module to work again under Python3? It was working before the GNU R upgrade and Python2 still works with the Sense Hat after the upgrade. So I suspect it's something specific to the Python3 upgrade.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Sense Hat missing RTIMU module

Mon Oct 24, 2016 7:05 pm

For reference, this is being dealt with on GitHub.

DaddyTheRunner
Posts: 8
Joined: Sun Sep 13, 2015 11:56 pm

Re: Sense Hat missing RTIMU module

Tue Oct 25, 2016 2:37 am

As a follow-up to Dave's comment, I can say that the information at the link he provided resolved the problem. Therefore, I recommend anyone else experiencing this issue to check out the link which has more details.

Return to “Astro Pi”