GrovePi GPS not working with no module named di_i2c'

We are trying to get a gps working on a normal grove-hat (no grove-hat+).
But when running example code from the github, we get an exception.

Are there any settings that need to be updated that aren’t inside the wiki?

Code we run:

Exception:

Traceback (most recent call last):
File “/home/pi/localbots/gps.py”, line 4, in
import grovepi
File “”, line 259, in load_module
File “/usr/local/lib/python3.9/dist-packages/grovepi-1.4.1-py3.9.egg/grovepi.py”, line 54, in
import di_i2c
ModuleNotFoundError: No module named ‘di_i2c’

1 Like

Means DI Sensors was not installed

Btw, what OS are you running?

1 Like

Where can I download these? I can’t find them in the tutorial

2 Likes

I am running a school version (same, but with 1 extra file), of raspbian

EDIT: Sorry, misunderstood the CAT command.

  1. PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)” NAME=“Debian GNU/Linux” VERSION_ID=“11” VERSION=“11 (bullseye)” VERSION_CODENAME=bullseye ID=debian HOME_URL=“https://www.debian.org/
2 Likes

What OS are you running?

cat /etc/os-release

What tutorial?

Every dependency is supposed to be installed when you ran:

curl -kL dexterindustries.com/update_grovepi | bash

The readme on the github page. The curl you mentioned gives an error that numpy is the wrong version, even after manually updating. It seems that the curl itself downgrades numpy

2 Likes
  1. Please run cat /etc/os-release so I know which Raspbian you are running.
  2. Suggest ignore the numpy issue until di_i2c module is no longer preventing progress

My guess is there are two Python versions installed system-wide. It will help if you know which they are:

What do these commands return?

python --version
python3 --version

Suggest running the following commands:

unzip -l /usr/local/lib/python2.?/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.?.egg

unzip -l /usr/local/lib/python3.?/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.?.egg

If the Raspbian For Robots Tools has been installed for your two Python versions you should see something like:

pi@Carl:~/Carl $  unzip -l /usr/local/lib/python2.?/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.?.egg
Archive:  /usr/local/lib/python2.7/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
     3154  2020-11-10 13:08   I2C_mutex.py
     3359  2020-11-10 13:08   I2C_mutex.pyc
     9445  2020-11-10 13:08   auto_detect_robot.py
     7994  2020-11-10 13:08   auto_detect_robot.pyc
     6211  2020-11-10 13:08   auto_detect_rpi.py
     5530  2020-11-10 13:08   auto_detect_rpi.pyc
    23756  2020-11-10 13:08   di_i2c.py
    16654  2020-11-10 13:08   di_i2c.pyc
     1700  2020-11-10 13:08   di_mutex.py
     2003  2020-11-10 13:08   di_mutex.pyc
      303  2020-11-10 13:08   EGG-INFO/PKG-INFO
      372  2020-11-10 13:08   EGG-INFO/SOURCES.txt
        1  2020-11-10 13:08   EGG-INFO/dependency_links.txt
       46  2020-11-10 13:08   EGG-INFO/requires.txt
       60  2020-11-10 13:08   EGG-INFO/top_level.txt
        1  2020-11-10 13:08   EGG-INFO/zip-safe
---------                     -------
    80589                     16 files

pi@Carl:~/Carl $  unzip -l /usr/local/lib/python3.?/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.?.egg
Archive:  /usr/local/lib/python3.7/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.7.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
     3154  2020-11-10 13:08   I2C_mutex.py
     9445  2020-11-10 13:08   auto_detect_robot.py
     6211  2020-11-10 13:08   auto_detect_rpi.py
    23756  2020-11-10 13:08   di_i2c.py
     1700  2020-11-10 13:08   di_mutex.py
      303  2020-11-10 13:08   EGG-INFO/PKG-INFO
      372  2020-11-10 13:08   EGG-INFO/SOURCES.txt
        1  2020-11-10 13:08   EGG-INFO/dependency_links.txt
       46  2020-11-10 13:08   EGG-INFO/requires.txt
       60  2020-11-10 13:08   EGG-INFO/top_level.txt
        1  2020-11-10 13:08   EGG-INFO/zip-safe
     2784  2020-11-10 13:08   __pycache__/I2C_mutex.cpython-37.pyc
     6488  2020-11-10 13:08   __pycache__/auto_detect_robot.cpython-37.pyc
     4593  2020-11-10 13:08   __pycache__/auto_detect_rpi.cpython-37.pyc
    14282  2020-11-10 13:08   __pycache__/di_i2c.cpython-37.pyc
     1634  2020-11-10 13:08   __pycache__/di_mutex.cpython-37.pyc
---------                     -------
    74830                     16 files

The system I ran the commands on is very old, and has Python2.7 and Python 3.7.

1 Like