Hello. I am trying to upload the examples onto my trilobot Rasberry Pi. But I keep getting the same error: ModuleNotFoundError: No module named ‘trilobot’
this is what I entered and received back:
eli@raspberrypi:~ $ cd ~/Pimoroni/trilobot/examples
eli@raspberrypi:~/Pimoroni/trilobot/examples $ python3 movements.py
Traceback (most recent call last):
File “/home/eli/Pimoroni/trilobot/examples/movements.py”, line 4, in
from trilobot import Trilobot
ModuleNotFoundError: No module named ‘trilobot’
eli@raspberrypi:~/Pimoroni/trilobot/examples $
Hello thanks - yes I followed that exactly and got this message. I then did it again copying and pasting all the code to make sure, but it still returns the same message…
This would mean the library does not exist or not in the expected folder… this probably leads to a not propper installation in the right environment…
For the virtual environment, please see here, here and here…
Basically, this is a four-step-process
create virtual env (if not already existing)
Activate virtual env for all further actions
install again everything as above as regular (but this time in the activated env)
Run programm (within the virtual env with all installations, libraries and dependancies…)
Which Raspberry Pi do you use for the trilobot and under which Raspberry Pi OS…?