No module named grovepi [solved]

I’m using the sample code from:

Using python 2 on the raspberry pi, each time I try to run these programs I get the error:
“import grovepi ImportError: No module named grovepi”

I have run the setup, and tested the program successfully, so I know the grovepi is working.

HELP!! Any help would be greatly appreciated.

Thanks - Mark

Hi Mark,
Can you try running in the Python folder ( :
sudo python install.
That should install the solve the problem.

Please let me know if you still face any problems.

Hi Karan,

Can you please explain what the script does?

My understanding is that it copies the script into a library that is accessible to all python scripts using an import grovepi. Does that sound right?

Does that mean we need to run the script again each time we get the latest changes from your git repo, where the file has changed?

Hi mcauser,
You are completely right, the script creates and installs the GrovePi library so that it’s accessible from the Python interpreter and you would have to run it again if you have made any changes to the library and want that to be accessible from Python too.


Hello, i’ve got the same problem but i don’t know what to do. I wrote the fiel in /usr/lib/python2.7 and run “sudo python install” All seems fine but when i run the command “import grovepi” i got the error message “ImportError : No modle named grovepi”

can you help me ?

i did the procedure again and then go to /home/pi/Desktop/Grovepi/Software/python/ and run sudo python install

Now it’s ok

have a good day

Hi I have a similar problem but mine is more of the issue no module named: Twitter. I have tried the python install but the issue still exist.

I hope you can assist me in solving this issue.

Thank You

You can use pip install twitter to install the twitter library for Python. You can refer to the documentation here: .