[SOLVED] ImportError: No module named grove_rgb_lcd

grovepi
faq

#1

When I try to run the Home_Weather_Display on my blue grovi pi/rpi3. I get the following error message:

Traceback (most recent call last):
File “Home_Weather_Display.py”, line 41, in
from grove_rgb_lcd import *
ImportError: No module named grove_rgb_lcd

I have install the software from the dexter website and I have ran the python 3 updates. Any information is gladly appreciated.


#2

Hi @breshep09,

Causes

The can be 2 reasons you are seeing this error:

  1. The most likely one is that you’re trying to run the script with Python3 and that won’t work for the moment.

  2. You haven’t run the install script.

Suggestions

So, in order to be sure that we’ve got everything in place, I would ask you to update the GrovePi package with the following command:

sudo curl -kL dexterindustries.com/update_grovepi | bash

Then, please, try running the Home_Weather_Display.py script again with Python 2 and not Python 3 - at the moment, we don’t support Python 3.

Permanent Solution

The permanent solution to this issue is to support Python 3 from now on. So, in response to your thread, we have created a hotfix that will make the GrovePi’s modules importable in Python 3 and therefore, we’ll get rid of this issue.

Here’s the pull request we’ve created (right now, we’re testing it to be sure it’s all okay):


If you feel like there’s anything else to talk about, please tell us.

Thank you!


#3

Thank you for your response. I am still getting the same ImportError message. How would I verify that I have the install script in the correct places. I do apologize for my novice questions.


#4

Hi @breshep09,

If you have followed the provided steps, then the ImportError message would be thrown when you’d launch the script with Python3.

In order to check if you have everything in place, tell us the following:

  1. Did you run the sudo -kl .... command?

  2. Is there a ~/Dexter/GrovePi folder in your file system?

  3. What’s the code you get when type in:

cd ~/Dexter/GrovePi
git rev-parse --verify HEAD

Also, a screenshot of what you get should help us understand what’s the missing link for your scenario.

Thank you!


#5

Thank you for this information. I have applied it and it seems to be
working.


#6

Hi @breshep09,

Thanks for telling us it worked.
I’m going to close the thread now.

Thank you!

Edit

Added support for Python 3 on the GrovePi:


#7