Sudo python BrickPiScratch.py Error


#1

After enabling sensors in Scratch and then running this

cd Desktop/BrickPi_Scratch/
sudo python BrickPiScratch.py

I get the following error:

Traceback (most recent call last):
File “BrickPiScratch.py”, line 47, in <module>
File “/home/pi/Desktop/BrickPi_Scratch/BrickPi.py”, line 15, in
<module>
Import serial
ImportError: No module named serial

Any help would be appreciated.


#2

Sure, sounds like we can deal with this.

Quick question: which distribution are you using? Is it the BrickPi version we offer?

If your RPi is connected to the internet, you should be able to run
sudo apt-get install python-serial

And if you reboot the pi, you should have access to the serial module in python.