What's Missing From Pi OS Lite?

Hi. Just starting out with the new Trilobot kit. I can get the example scripts to run using full Pi OS, both directly and via SSH. When I install Pi OS Lite the scripts won’t run with a “module not found” error. Makes me think there’s something in the full OS that I need to install/change on the Lite OS to get things working. Anybody any ideas please?

Many thanks

Yep, Lite doesn’t come with as many modules installed by default as full fat Pi OS does. The error should give you a clue as to what’s missing - can you post the full error text?

Thanks for your reply. Error message is…

trilobot@trilobot : ~/trilobot-python/examples $ python3 underlight_chaser.py

Traceback (most recent call last):

File “/home/trilobot/trilobot-python/examples/underlight_chaser.py”, line 4, in

from trilobot import *

ModuleNotFoundError: No module named ‘trilobot’

That would seem to suggest you haven’t installed the Trilobot library?

What he said.

Did you run, pip3 install trilobot ?

OK, thanks. I’ll look at that again, but Trilobot library was installed using same terminal commands that I used to install on full version of Pi OS and that works fine. Basically I’ve done the same setup for full and lite OS but only lite OS gives the error.

We were expecting it to list a different module name? I was anyway.

Here’s the start of the code (as published on github)…

#!/usr/bin/env python3

import time
from trilobot import *

Did the installer throw any errors when you ran it? On Lite, you might need to install git and pip before it will work -

sudo apt install git python3-pip

Thank you. Yes, I did install git, but not pip, so will give that a try

Just checked and both pip and git seem properly installed.

Might be worth re-running the installer then, to see if there’s any useful error message that comes out of it; there must be something causing it to not put trilobot somewhere findable!

Cheers. Will do. Thank you

I’m back!

Right, fully upgraded the Pi including firmware. Reinstalled git, pip, python and Trilobot with no errors. Still won’t run example code, see below. As I mentioned before, no problems using Pi OS with GUI, only get this problem running headless, so I’m figuring something is missing from the headless OS… but what? Any ideas???

That’s a new error; it’s now failing to find smbus, and that error is coming out of trilobot so although it might not seem like it, you’re moving forwards :-)

pip3 install smbus might pick it up (assuming that’s what the package is called), although I would have expected the trilobot installer to pull it in automagically.