[Solved] ModuleNotFoundError: No module named 'di_i2c'


I have seen different topics on this subject but it doesn’t work.
I created a virtualenv.
I install my project and the requirements like grovepi.

When I run my project, I have an error.

in module
import grovepi
File “/home/pi/Desktop/Project/TestBed/venv/lib/python3.6/site-packages/grovepi.py”, line 52, in
import di_i2c

I passed few hours on this problem but I don’t find a solution.

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.11 (stretch)
Release: 9.11
Codename: stretch

I installed python3.6 through this tutorial : https://medium.com/@isma3il/install-python-3-6-or-3-7-and-pip-on-raspberry-pi-85e657aadb1e

Do you need more details ?

Thank you for your help.

1 Like

How did you install grovepi?
The preferred way to install it within a virtual env is

curl -kL dexterindustries.com/update_grovepi | bash -s -- --user-local --bypass-gui-installation

This should pull in all the necessary libraries for your venv.


Thank you !
It’s working.

1 Like