GrovePI: ModuleNotFoundError: No module named 'di_i2c'

Dear all,

I’m trying to get GrovePi on Raspberry Pi 4B running Ubuntu Server 22.04 LTS working.

I ran “curl -kL dexterindustries.com/update_grovepi | bash” successfully, but have a few errors, warnings during install.

pi@raspberrypi: sudo i2cdetect -y 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –

The GrovePi doesnt seem to be recognized. When running the grove_led_blink.py I get the error:
Traceback (most recent call last):
File “/home/pi/Dexter/GrovePi/Software/Python/grove_led_blink.py”, line 37, in
from grovepi import *
File “/home/pi/Dexter/GrovePi/Software/Python/grovepi.py”, line 54, in
import di_i2c
ModuleNotFoundError: No module named ‘di_i2c’

The di_i2c.py is actually present in ~/Dexter/lib/Dexter/RFR_Tools/miscellaneous/

Can someone please guide me on how to fix this problem?

Welcome to GrovePi Installer.
Updating GrovePi for master branch with the following options:
–no-dependencies=false
–no-update-aptget=false
–bypass-rfrtools=false
–bypass-python-rfrtools=false
–bypass-gui-installation=false
–user-local=false
–env-local=false
–system-wide=true
Using “master” branch
Options used for RFR_Tools script: “–system-wide master --use-python3-exe-too --update-aptget --install-deb-deps --install-python-package --install-gui”
Installing RFR_Tools. This might take a while…
Updating RFR_Tools for master branch with the following options:
–install-python-package=true
–system-wide=true
–user-local=false
–env-local=false
–use-python3-exe-too=true
–update-aptget=true
–install-deb-deps=true
–install-gui=true
Installing script_tools.
Done installing script_tools
Updating debian repository within RFR_Tools
RFR_Tools: Couldn’t add Nodejs repo to source because it’s not available for “jammy” distribution

Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python2-dev python2 python-dev-is-python3

E: Package ‘python-dev’ has no installation candidate
Cloning RFR Tools
Done Cloning RFR Tools
Removing “auto_detect_rpi” to make space for the new one
Installing python package for RFR_Tools
Traceback (most recent call last):
File “setup.py”, line 18, in
import setuptools
ImportError: No module named setuptools
/home/pi/Dexter/lib/Dexter/RFR_Tools/advanced_communication_options
~/Dexter/lib/Dexter/RFR_Tools/advanced_communication_options ~/Dexter/lib/Dexter/RFR_Tools/advanced_communication_options
/home/pi/Dexter/lib/Dexter
~/Dexter/lib/Dexter/RFR_Tools/advanced_communication_options

Note, selecting ‘wxpython-tools’ instead of ‘python-wxtools’
E: Unable to locate package python-wxgtk3.0
E: Couldn’t find any package by glob ‘python-wxgtk3.0’
E: Couldn’t find any package by regex ‘python-wxgtk3.0’
E: Unable to locate package python-psutil
Installing Scratch Environment
Traceback (most recent call last):
File “setup.py”, line 1, in
from setuptools import setup
ImportError: No module named setuptools
make: *** [Makefile:10: install] Error 1
Installing Scratch on the desktop
sudo: lxpanelctl: command not found
Version: bookworm/sid
install.sh: line 129: amixer: command not found
sudo: amixer: command not found

The following packages will be REMOVED:
espeak
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 209 kB disk space will be freed.
(Reading database … 138495 files and directories currently installed.)
Removing espeak (1.48.15+dfsg-3) …
Processing triggers for man-db (2.10.2-1) …

espeak-ng is already the newest version (1.50+dfsg-10).
python3-espeak is already the newest version (0.5-4build1).
speech-dispatcher-espeak is already the newest version (0.11.1-1ubuntu3).
The following NEW packages will be installed:
espeak
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 64.0 kB of archives.
After this operation, 209 kB of additional disk space will be used.
Get:1 Index of /ubuntu-ports jammy/universe arm64 espeak arm64 1.48.15+dfsg-3 [64.0 kB]
Fetched 64.0 kB in 0s (340 kB/s)
Selecting previously unselected package espeak.
(Reading database … 138468 files and directories currently installed.)
Preparing to unpack …/espeak_1.48.15+dfsg-3_arm64.deb …
Unpacking espeak (1.48.15+dfsg-3) …
Setting up espeak (1.48.15+dfsg-3) …
Processing triggers for man-db (2.10.2-1) …
Scanning processes…
Scanning processor microcode…
Scanning linux images…

Running kernel seems to be up-to-date.

Failed to check for processor microcode upgrades.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
install.sh: line 139: [: bookworm/sid: integer expression expected
install.sh: line 157: [: bookworm/sid: integer expression expected
install.sh: line 161: [: bookworm/sid: integer expression expected
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Note, selecting ‘wxpython-tools’ instead of ‘python-wxtools’
E: Unable to locate package python-wxgtk3.0
E: Couldn’t find any package by glob ‘python-wxgtk3.0’
E: Couldn’t find any package by regex ‘python-wxgtk3.0’
E: Unable to locate package python-psutil
Installing TroubleShooting
Done with TRoubleshooting
Done installing RFR_Tools library
Done installing RFR_Tool
Installing GrovePi dependencies. This might take a while…
Installing dependencies for the GrovePi
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python2-dev python2 python-dev-is-python3

Package python-scipy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package python-smbus
E: Package ‘python-dev’ has no installation candidate
E: Unable to locate package python-serial
E: Unable to locate package python-rpi.gpio
E: Couldn’t find any package by glob ‘python-rpi.gpio’
E: Couldn’t find any package by regex ‘python-rpi.gpio’
E: Unable to locate package python-numpy
E: Package ‘python-scipy’ has no installation candidate
Dependencies for the GrovePi installed
Special thanks to Joe Sanford at Tufts University. This script was derived from his work. Thank you Joe!
Pi4 already configured
Adding I2C-dev and SPI-dev in /etc/modules . . .
I2C-dev already present
i2c-bcm2708 already present
spi-dev already present
Making I2C changes in /boot/config.txt . . .
i2c1 already present
i2c_arm already present
adduser: The group `i2c’ already exists.
Installing avrdude for the GrovePi
/home/pi/Dexter/lib/AVRDUDE Found!
avrdude 5.10 Not Found,Installing avrdude now
/home/pi/Dexter/lib/AVRDUDE Found!
/home/pi/Dexter/lib/AVRDUDE/avrdude /home/pi/Dexter/GrovePi/Script
dpkg: error processing archive avrdude_5.10-4_armhf.deb (–install):
package architecture (armhf) does not match system (arm64)
Errors were encountered while processing:
avrdude_5.10-4_armhf.deb
Setting up Raspberry Pi to make it work with the Gertboard
and the ATmega chip on-board with the Arduino IDE.

Checking …
Avrdude: OK
Arduino IDE: Not installed. Please install it first

/home/pi/Dexter/GrovePi/Script
done with AVRDUDE for the GrovePi
Removing “grovepi” to make space for the new one
Removing /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg egg
Removing /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg egg
Removing /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg egg
Removing /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg egg
Copying to .tmp_modules module ./grovepi.py
Copying to .tmp_modules module ./grove_compass_lib.py
Copying to .tmp_modules module ./grove_i2c_motor_driver/grove_i2c_motor_driver.py
Copying to .tmp_modules module ./grove_i2c_temp_hum_hdc1000/grove_i2c_temp_hum_hdc1000.py
Copying to .tmp_modules module ./grove_oled/grove_oled.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp180/Adafruit_I2C.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp180/grove_i2c_barometic_sensor_BMP180.py
Copying to .tmp_modules module ./grove_barometer_sensors/high_accuracy_hp206c_barometer/hp206c.py
Copying to .tmp_modules module ./grove_barometer_sensors/high_accuracy_hp206c_barometer/KalmanFilter.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp085/grove_barometer_lib.py
Copying to .tmp_modules module ./grove_rgb_lcd/grove_rgb_lcd.py
Copying to .tmp_modules module ./grove_i2c_adc/grove_i2c_adc.py
Copying to .tmp_modules module ./grove_gesture_sensor/grove_gesture_sensor.py
Copying to .tmp_modules module ./grove_dht_pro_filter/grove_dht.py
Copying to .tmp_modules module ./grove_co2_sensor/grove_co2_lib.py
Copying to .tmp_modules module ./grove_i2c_digital_light_sensor/Adafruit_I2C.py
Copying to .tmp_modules module ./grove_hightemperature_sensor/grove_hightemperature_sensor.py
Copying to .tmp_modules module ./grove_mini_motor_driver/grove_mini_motor_driver.py
Copying to .tmp_modules module ./grove_i2c_oled_128_64/grove_128_64_oled.py
Copying to .tmp_modules module ./grove_6axis_acc_compass/lsm303d.py
Copying to .tmp_modules module ./grove_chainable_rgb_led/direct_serial_lib/chainable_rgb_direct.py
Copying to .tmp_modules module ./grove_gps/dextergps.py
Copying to .tmp_modules module ./grove_accelerometer_16g/adxl345.py
Copying to .tmp_modules module ./grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py
Copying to .tmp_modules module ./grove_i2c_temp_hum_sensor_mini/grove_i2c_temp_hum_mini.py
Copying to .tmp_modules module ./grove_rflink433mhz_oneway_kit/grove_rflink433mhz.py
Copying to .tmp_modules module ./grove_i2c_color_sensor/grove_i2c_color_sensor.py
/usr/lib/python3/dist-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated ‘description-file’ will not be supported in future versions. Please use the underscore name ‘description_file’ instead
warnings.warn(
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
creating .tmp_modules/grovepi.egg-info
writing .tmp_modules/grovepi.egg-info/PKG-INFO
writing dependency_links to .tmp_modules/grovepi.egg-info/dependency_links.txt
writing requirements to .tmp_modules/grovepi.egg-info/requires.txt
writing top-level names to .tmp_modules/grovepi.egg-info/top_level.txt
writing manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
reading manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
writing manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
creating build
creating build/lib
copying .tmp_modules/multichannel_gas_sensor.py → build/lib
copying .tmp_modules/grove_dht.py → build/lib
copying .tmp_modules/lsm303d.py → build/lib
copying .tmp_modules/grove_128_64_oled.py → build/lib
copying .tmp_modules/dextergps.py → build/lib
copying .tmp_modules/grove_i2c_adc.py → build/lib
copying .tmp_modules/grove_co2_lib.py → build/lib
copying .tmp_modules/grove_rgb_lcd.py → build/lib
copying .tmp_modules/grove_gesture_sensor.py → build/lib
copying .tmp_modules/Adafruit_I2C.py → build/lib
copying .tmp_modules/grovepi.py → build/lib
copying .tmp_modules/grove_i2c_barometic_sensor_BMP180.py → build/lib
copying .tmp_modules/grove_i2c_temp_hum_hdc1000.py → build/lib
copying .tmp_modules/grove_rflink433mhz.py → build/lib
copying .tmp_modules/grove_mini_motor_driver.py → build/lib
copying .tmp_modules/grove_i2c_motor_driver.py → build/lib
copying .tmp_modules/grove_i2c_temp_hum_mini.py → build/lib
copying .tmp_modules/grove_barometer_lib.py → build/lib
copying .tmp_modules/grove_compass_lib.py → build/lib
copying .tmp_modules/grove_hightemperature_sensor.py → build/lib
copying .tmp_modules/hp206c.py → build/lib
copying .tmp_modules/chainable_rgb_direct.py → build/lib
copying .tmp_modules/grove_oled.py → build/lib
copying .tmp_modules/KalmanFilter.py → build/lib
copying .tmp_modules/grove_i2c_color_sensor.py → build/lib
copying .tmp_modules/adxl345.py → build/lib
creating build/bdist.linux-aarch64
creating build/bdist.linux-aarch64/egg
copying build/lib/multichannel_gas_sensor.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_dht.py → build/bdist.linux-aarch64/egg
copying build/lib/lsm303d.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_128_64_oled.py → build/bdist.linux-aarch64/egg
copying build/lib/dextergps.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_adc.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_co2_lib.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_rgb_lcd.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_gesture_sensor.py → build/bdist.linux-aarch64/egg
copying build/lib/Adafruit_I2C.py → build/bdist.linux-aarch64/egg
copying build/lib/grovepi.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_barometic_sensor_BMP180.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_temp_hum_hdc1000.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_rflink433mhz.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_mini_motor_driver.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_motor_driver.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_temp_hum_mini.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_barometer_lib.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_compass_lib.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_hightemperature_sensor.py → build/bdist.linux-aarch64/egg
copying build/lib/hp206c.py → build/bdist.linux-aarch64/egg
copying build/lib/chainable_rgb_direct.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_oled.py → build/bdist.linux-aarch64/egg
copying build/lib/KalmanFilter.py → build/bdist.linux-aarch64/egg
copying build/lib/grove_i2c_color_sensor.py → build/bdist.linux-aarch64/egg
copying build/lib/adxl345.py → build/bdist.linux-aarch64/egg
byte-compiling build/bdist.linux-aarch64/egg/multichannel_gas_sensor.py to multichannel_gas_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_dht.py to grove_dht.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/lsm303d.py to lsm303d.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_128_64_oled.py to grove_128_64_oled.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/dextergps.py to dextergps.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_adc.py to grove_i2c_adc.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_co2_lib.py to grove_co2_lib.cpython-310.pyc
Sorry: IndentationError: unindent does not match any outer indentation level (grove_co2_lib.py, line 40)
byte-compiling build/bdist.linux-aarch64/egg/grove_rgb_lcd.py to grove_rgb_lcd.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_gesture_sensor.py to grove_gesture_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/Adafruit_I2C.py to Adafruit_I2C.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grovepi.py to grovepi.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_barometic_sensor_BMP180.py to grove_i2c_barometic_sensor_BMP180.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_temp_hum_hdc1000.py to grove_i2c_temp_hum_hdc1000.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_rflink433mhz.py to grove_rflink433mhz.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_mini_motor_driver.py to grove_mini_motor_driver.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_motor_driver.py to grove_i2c_motor_driver.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_temp_hum_mini.py to grove_i2c_temp_hum_mini.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_barometer_lib.py to grove_barometer_lib.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_compass_lib.py to grove_compass_lib.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_hightemperature_sensor.py to grove_hightemperature_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/hp206c.py to hp206c.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/chainable_rgb_direct.py to chainable_rgb_direct.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_oled.py to grove_oled.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/KalmanFilter.py to KalmanFilter.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_color_sensor.py to grove_i2c_color_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/adxl345.py to adxl345.cpython-310.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/PKG-INFO → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/SOURCES.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/dependency_links.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/requires.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/top_level.txt → build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents…
creating dist
creating ‘dist/grovepi-1.4.1-py3.10.egg’ and adding ‘build/bdist.linux-aarch64/egg’ to it
removing ‘build/bdist.linux-aarch64/egg’ (and everything under it)
Processing grovepi-1.4.1-py3.10.egg
Copying grovepi-1.4.1-py3.10.egg to /usr/local/lib/python3.10/dist-packages
Adding grovepi 1.4.1 to easy-install.pth file

Installed /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg
Processing dependencies for grovepi==1.4.1
Searching for smbus-cffi==0.5.1
Best match: smbus-cffi 0.5.1
Processing smbus_cffi-0.5.1-py3.10-linux-aarch64.egg
smbus-cffi 0.5.1 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/smbus_cffi-0.5.1-py3.10-linux-aarch64.egg
Searching for scipy==1.8.0
Best match: scipy 1.8.0
Adding scipy 1.8.0 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Searching for pyserial==3.5
Best match: pyserial 3.5
Adding pyserial 3.5 to easy-install.pth file
Installing pyserial-miniterm script to /usr/local/bin
Installing pyserial-ports script to /usr/local/bin

Using /usr/lib/python3/dist-packages
Searching for numpy==1.21.5
Best match: numpy 1.21.5
Adding numpy 1.21.5 to easy-install.pth file
Installing f2py script to /usr/local/bin
Installing f2py3 script to /usr/local/bin
Installing f2py3.10 script to /usr/local/bin

Using /usr/lib/python3/dist-packages
Searching for RPi.GPIO==0.7.1a4
Best match: RPi.GPIO 0.7.1a4
Adding RPi.GPIO 0.7.1a4 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Searching for cffi==1.16.0
Best match: cffi 1.16.0
Processing cffi-1.16.0-py3.10-linux-aarch64.egg
cffi 1.16.0 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/cffi-1.16.0-py3.10-linux-aarch64.egg
Searching for pycparser==2.21
Best match: pycparser 2.21
Processing pycparser-2.21-py3.10.egg
pycparser 2.21 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/pycparser-2.21-py3.10.egg
Finished processing dependencies for grovepi==1.4.1
Copying to .tmp_modules module ./grovepi.py
Copying to .tmp_modules module ./grove_compass_lib.py
Copying to .tmp_modules module ./build/lib/multichannel_gas_sensor.py
Copying to .tmp_modules module ./build/lib/grove_dht.py
Copying to .tmp_modules module ./build/lib/lsm303d.py
Copying to .tmp_modules module ./build/lib/grove_128_64_oled.py
Copying to .tmp_modules module ./build/lib/dextergps.py
Copying to .tmp_modules module ./build/lib/grove_i2c_adc.py
Copying to .tmp_modules module ./build/lib/grove_co2_lib.py
Copying to .tmp_modules module ./build/lib/grove_rgb_lcd.py
Copying to .tmp_modules module ./build/lib/grove_gesture_sensor.py
Copying to .tmp_modules module ./build/lib/Adafruit_I2C.py
Copying to .tmp_modules module ./build/lib/grovepi.py
Copying to .tmp_modules module ./build/lib/grove_i2c_barometic_sensor_BMP180.py
Copying to .tmp_modules module ./build/lib/grove_i2c_temp_hum_hdc1000.py
Copying to .tmp_modules module ./build/lib/grove_rflink433mhz.py
Copying to .tmp_modules module ./build/lib/grove_mini_motor_driver.py
Copying to .tmp_modules module ./build/lib/grove_i2c_motor_driver.py
Copying to .tmp_modules module ./build/lib/grove_i2c_temp_hum_mini.py
Copying to .tmp_modules module ./build/lib/grove_barometer_lib.py
Copying to .tmp_modules module ./build/lib/grove_compass_lib.py
Copying to .tmp_modules module ./build/lib/grove_hightemperature_sensor.py
Copying to .tmp_modules module ./build/lib/hp206c.py
Copying to .tmp_modules module ./build/lib/chainable_rgb_direct.py
Copying to .tmp_modules module ./build/lib/grove_oled.py
Copying to .tmp_modules module ./build/lib/KalmanFilter.py
Copying to .tmp_modules module ./build/lib/grove_i2c_color_sensor.py
Copying to .tmp_modules module ./build/lib/adxl345.py
Copying to .tmp_modules module ./grove_i2c_motor_driver/grove_i2c_motor_driver.py
Copying to .tmp_modules module ./grove_i2c_temp_hum_hdc1000/grove_i2c_temp_hum_hdc1000.py
Copying to .tmp_modules module ./grove_oled/grove_oled.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp180/Adafruit_I2C.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp180/grove_i2c_barometic_sensor_BMP180.py
Copying to .tmp_modules module ./grove_barometer_sensors/high_accuracy_hp206c_barometer/hp206c.py
Copying to .tmp_modules module ./grove_barometer_sensors/high_accuracy_hp206c_barometer/KalmanFilter.py
Copying to .tmp_modules module ./grove_barometer_sensors/barometric_sensor_bmp085/grove_barometer_lib.py
Copying to .tmp_modules module ./grove_rgb_lcd/grove_rgb_lcd.py
Copying to .tmp_modules module ./grove_i2c_adc/grove_i2c_adc.py
Copying to .tmp_modules module ./grove_gesture_sensor/grove_gesture_sensor.py
Copying to .tmp_modules module ./grove_dht_pro_filter/grove_dht.py
Copying to .tmp_modules module ./grove_co2_sensor/grove_co2_lib.py
Copying to .tmp_modules module ./grove_i2c_digital_light_sensor/Adafruit_I2C.py
Copying to .tmp_modules module ./grove_hightemperature_sensor/grove_hightemperature_sensor.py
Copying to .tmp_modules module ./grove_mini_motor_driver/grove_mini_motor_driver.py
Copying to .tmp_modules module ./grove_i2c_oled_128_64/grove_128_64_oled.py
Copying to .tmp_modules module ./grove_6axis_acc_compass/lsm303d.py
Copying to .tmp_modules module ./grove_chainable_rgb_led/direct_serial_lib/chainable_rgb_direct.py
Copying to .tmp_modules module ./grove_gps/dextergps.py
Copying to .tmp_modules module ./grove_accelerometer_16g/adxl345.py
Copying to .tmp_modules module ./grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py
Copying to .tmp_modules module ./grove_i2c_temp_hum_sensor_mini/grove_i2c_temp_hum_mini.py
Copying to .tmp_modules module ./grove_rflink433mhz_oneway_kit/grove_rflink433mhz.py
Copying to .tmp_modules module ./grove_i2c_color_sensor/grove_i2c_color_sensor.py
/usr/lib/python3/dist-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated ‘description-file’ will not be supported in future versions. Please use the underscore name ‘description_file’ instead
warnings.warn(
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
creating .tmp_modules/grovepi.egg-info
writing .tmp_modules/grovepi.egg-info/PKG-INFO
writing dependency_links to .tmp_modules/grovepi.egg-info/dependency_links.txt
writing requirements to .tmp_modules/grovepi.egg-info/requires.txt
writing top-level names to .tmp_modules/grovepi.egg-info/top_level.txt
writing manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
reading manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
writing manifest file ‘.tmp_modules/grovepi.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py

byte-compiling build/bdist.linux-aarch64/egg/multichannel_gas_sensor.py to multichannel_gas_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_dht.py to grove_dht.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/lsm303d.py to lsm303d.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_128_64_oled.py to grove_128_64_oled.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/dextergps.py to dextergps.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_adc.py to grove_i2c_adc.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_co2_lib.py to grove_co2_lib.cpython-310.pyc
Sorry: IndentationError: unindent does not match any outer indentation level (grove_co2_lib.py, line 40)
byte-compiling build/bdist.linux-aarch64/egg/grove_rgb_lcd.py to grove_rgb_lcd.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_gesture_sensor.py to grove_gesture_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/Adafruit_I2C.py to Adafruit_I2C.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grovepi.py to grovepi.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_barometic_sensor_BMP180.py to grove_i2c_barometic_sensor_BMP180.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_temp_hum_hdc1000.py to grove_i2c_temp_hum_hdc1000.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_rflink433mhz.py to grove_rflink433mhz.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_mini_motor_driver.py to grove_mini_motor_driver.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_motor_driver.py to grove_i2c_motor_driver.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_temp_hum_mini.py to grove_i2c_temp_hum_mini.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_barometer_lib.py to grove_barometer_lib.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_compass_lib.py to grove_compass_lib.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_hightemperature_sensor.py to grove_hightemperature_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/hp206c.py to hp206c.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/chainable_rgb_direct.py to chainable_rgb_direct.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_oled.py to grove_oled.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/KalmanFilter.py to KalmanFilter.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/grove_i2c_color_sensor.py to grove_i2c_color_sensor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/adxl345.py to adxl345.cpython-310.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/PKG-INFO → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/SOURCES.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/dependency_links.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/requires.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying .tmp_modules/grovepi.egg-info/top_level.txt → build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents…
creating ‘dist/grovepi-1.4.1-py3.10.egg’ and adding ‘build/bdist.linux-aarch64/egg’ to it
removing ‘build/bdist.linux-aarch64/egg’ (and everything under it)
Processing grovepi-1.4.1-py3.10.egg
Removing /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg
Copying grovepi-1.4.1-py3.10.egg to /usr/local/lib/python3.10/dist-packages
grovepi 1.4.1 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.10/dist-packages/grovepi-1.4.1-py3.10.egg
Processing dependencies for grovepi==1.4.1
Searching for smbus-cffi==0.5.1
Best match: smbus-cffi 0.5.1
Processing smbus_cffi-0.5.1-py3.10-linux-aarch64.egg
smbus-cffi 0.5.1 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/smbus_cffi-0.5.1-py3.10-linux-aarch64.egg
Searching for scipy==1.8.0
Best match: scipy 1.8.0
Adding scipy 1.8.0 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Searching for pyserial==3.5
Best match: pyserial 3.5
Adding pyserial 3.5 to easy-install.pth file
Installing pyserial-miniterm script to /usr/local/bin
Installing pyserial-ports script to /usr/local/bin

Using /usr/lib/python3/dist-packages
Searching for numpy==1.21.5
Best match: numpy 1.21.5
Adding numpy 1.21.5 to easy-install.pth file
Installing f2py script to /usr/local/bin
Installing f2py3 script to /usr/local/bin
Installing f2py3.10 script to /usr/local/bin

Using /usr/lib/python3/dist-packages
Searching for RPi.GPIO==0.7.1a4
Best match: RPi.GPIO 0.7.1a4
Adding RPi.GPIO 0.7.1a4 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Searching for cffi==1.16.0
Best match: cffi 1.16.0
Processing cffi-1.16.0-py3.10-linux-aarch64.egg
cffi 1.16.0 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/cffi-1.16.0-py3.10-linux-aarch64.egg
Searching for pycparser==2.21
Best match: pycparser 2.21
Processing pycparser-2.21-py3.10.egg
pycparser 2.21 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/pycparser-2.21-py3.10.egg
Finished processing dependencies for grovepi==1.4.1

1 Like

I have zero experience with Ubuntu on a Pi.
However I2cdetect should see the grovepi, even if no libraries is installed.
Is I2C active in your Ubuntu setup?

1 Like

Hi Daniell, I successfully installed the GoPiGo3 software on 22.04, and the GrovePi software install would require the same steps:

I built a couple scripts to do it for the GoPiGo3 - if you were to change the Dexter/…/GoPiGo3 lines to …/GrovePi - you could do the same EXCEPT I saw something in your post about bookworm - DI I2C will not run on bookworm because it depends on wiringpi. Stay on 22.04 and my scripts should get you there - it is not simple but is doable.

If you can switch back to the LegacyPi OS - everything will work as documented on the DI site, but regardless - Here are my scripts:

1 Like

Thank you for the quick reply. I’ll give your script a try

1 Like

@Daniell are you working on Ubuntu 22.04 or did you upgrade to 23.10 Bookworm?

The existing di_i2c.py is not compatible with Bookworm.

1 Like

I’m on 22.04 LTS:
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1038-raspi aarch64)
…not sure why the reference to bookworm appears during installation…

Anyhow, today I was able to play a bit more and realized that i2c was not working correctly. According to some information I found, the wiringpi available in the jammy sources does not support raspberry pi 4b yet.

pi@raspberrypi:/boot$ ls /dev/i2*
/dev/i2c-1
pi@raspberrypi:/boot$ gpio readall
Oops - unable to determine board type… model: 17

I found version wiringpi-2.61-1-arm64 and after I got the output as expected:

pi@raspberrypi:/boot$gpio -v
gpio version: 2.61
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Pi 4B, Revision: 05, Memory: 4096MB, Maker: Sony

  • Device tree is enabled.
    *–> Raspberry Pi 4 Model B Rev 1.5
  • This Raspberry Pi supports user-level GPIO access.

Anyways, the GrovePI is not detected.

Also, I wanted to have a closer look at your script. To make i2c work on 22.04, I just need to run this script: https://github.com/slowrunner/ROS2-GoPiGo3/blob/main/utils/install_gopigo3_on_ubuntu.sh

How is the i2c issue on my system addressed in your script exactly or should it work already the way I installed?

2 Likes

Actually, no but close.

Here is a script to try - fix_for_grovepi.sh:

#!/bin/bash

# === install gcc and make
sudo apt install -y gcc
sudo apt install -y make
sudo apt install -y python3-dev

sudo chgrp spi /dev/spidev0.0
sudo chgrp spi /dev/spidev0.1

sudo chmod 660 /dev/spidev0.0
sudo chmod 660 /dev/spidev0.1

sudo chgrp gpio /sys/class/gpio/export
sudo chgrp gpio /sys/class/gpio/unexport

sudo chmod 770 /sys/class/gpio/export
sudo chmod 770 /sys/class/gpio/unexport

# Bring down the permissions rule
 
wget https://raw.githubusercontent.com/slowrunner/ROS2-GoPiGo3/main/99-com.rules




sudo curl -kL dexterindustries.com/update_tools | bash -s -- --system-wide --use-python3-exe-too --install-deb-debs --install-python-package

sudo apt install -y --no-install-recommends python3-pip python3-numpy python3-curtsies

git clone https://github.com/DexterInd/DI_Sensors.git /home/pi/Dexter/DI_Sensors

sudo apt install -y python3-rpi.gpio

sudo apt install -y unzip

# === pigpiod

wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make
sudo make install
cd ..
rm master.zip


sudo cp /home/ubuntu/utils/pigpiod.service /etc/systemd/system
sudo systemctl enable pigpiod.service
sudo systemctl start pigpiod.service
systemctl status pigpiod.service

# === setup RFR_Tools
sudo git clone https://github.com/DexterInd/RFR_Tools.git /home/pi/Dexter/lib/Dexter/RFR_Tools
sudo apt  install -y libffi-dev

cd /home/pi/Dexter/lib/Dexter//RFR_Tools/miscellaneous/
sudo python3 setup.py install


# ==== SETUP  DI_Sensors Python3 eggs

cd /home/pi/Dexter/DI_Sensors/Python
sudo python3 setup.py install

# ==== Setup non-root access rules ====

sudo cp /home/ubuntu/utils/99-com.rules /etc/udev/rules.d

Your log seems to show a successful install so perhaps nothing more is needed

I’m not sure if the GrovePi needed the pigpiod daemon - I think some of the ports can do pulse width modulation driving of motors which would likely use pigpiod. I’m out of my league with the GrovePi here.

and when you say it doesn’t see the board - you mean

i2cdetect -y 1 

doesn’t show anything appearing?

What happens with:

python -c 'import grovepi;print("success")'

actually after installing 22.04 LTS Server from scratch and running the following commands, everything works. Running the script as provided (skipping the pigpio stuff), everything worked and I can run “python -c ‘import grovepi;print(“success”)’”

yes, according to ‘i2cdetect -y 1’ doesnt show anything and still doesnt
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –

but the grove_led_blink.py works fine now an LED is blinking

Thanks for the great support @ cyclicalobsessive your script was the key.
I

After installing Ubuntu Server 64bit LTS 22.04 on the raspberry PI 4B, the following commands/script was executed:

sudo apt update
sudo apt upgrade

sudo apt install -y python-is-python3
sudo apt install -y python3-dev
sudo apt install -y python3-pip

sudo curl -kL dexterindustries.com/update_grovepi | bash -s – --system-wide --use-python3-exe-too --install-deb-debs --install-python-package

#!/bin/bash

=== install gcc and make

sudo apt install -y gcc
sudo apt install -y make
sudo apt install -y python3-dev

sudo chgrp spi /dev/spidev0.0
sudo chgrp spi /dev/spidev0.1

sudo chmod 660 /dev/spidev0.0
sudo chmod 660 /dev/spidev0.1

sudo chgrp gpio /sys/class/gpio/export
sudo chgrp gpio /sys/class/gpio/unexport

sudo chmod 770 /sys/class/gpio/export
sudo chmod 770 /sys/class/gpio/unexport

Bring down the permissions rule

wget https://github.com/slowrunner/ROS2-GoPiGo3/blob/main/utils/99-com.rules

sudo curl -kL dexterindustries.com/update_tools | bash -s – --system-wide --use-python3-exe-too --install-deb-debs --install-python-package

sudo apt install -y --no-install-recommends python3-pip python3-numpy python3-curtsies

git clone GitHub - DexterInd/DI_Sensors: Dexter Industries Sensors /home/pi/Dexter/DI_Sensors

sudo apt install -y python3-rpi.gpio

=== setup RFR_Tools

sudo git clone GitHub - DexterInd/RFR_Tools: Common tools to all robots /home/pi/Dexter/lib/Dexter/RFR_Tools
sudo apt install -y libffi-dev

cd /home/pi/Dexter/lib/Dexter//RFR_Tools/miscellaneous/
sudo python3 setup.py install

==== SETUP DI_Sensors Python3 eggs

cd /home/pi/Dexter/DI_Sensors/Python
sudo python3 setup.py install

==== Setup non-root access rules ====

sudo cp /home/pi/99-com.rules /etc/udev/rules.d

1 Like