# No module named Trilobot

**URL:** https://forums.pimoroni.com/t/no-module-named-trilobot/27365
**Category:** Support
**Created:** [February 22, 2025, 8:36am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365 "2025-02-22T08:36:46Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Eli](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Eli](https://forums.pimoroni.com/u/Eli)
#### Post date: [February 22, 2025, 8:36am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/1 "2025-02-22T08:36:46Z")

</div>

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 $

---

<div class="post-metadata">

### Author: ![m1cr0py7h0n](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/m1cr0py7h0n/32/11507_2.png) [@m1cr0py7h0n](https://forums.pimoroni.com/u/m1cr0py7h0n)
#### Post date: [February 22, 2025, 9:39am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/2 "2025-02-22T09:39:38Z")

</div>

…have you followed the [instructions given here](https://learn.pimoroni.com/article/assembling-trilobot#installing-the-trilobot-python-library)?

---

<div class="post-metadata">

### Author: ![Eli](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Eli](https://forums.pimoroni.com/u/Eli)
#### Post date: [February 23, 2025, 10:49am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/3 "2025-02-23T10:49:09Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![m1cr0py7h0n](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/m1cr0py7h0n/32/11507_2.png) [@m1cr0py7h0n](https://forums.pimoroni.com/u/m1cr0py7h0n)
#### Post date: [February 23, 2025, 11:14am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/4 "2025-02-23T11:14:26Z")

</div>

> [@Eli](#):
>
> File “/home/eli/Pimoroni/trilobot/examples/movements.py”, line 4, in  
> from trilobot import Trilobot

You could do the following:

In the file “/home/eli/Pimoroni/trilobot/examples/movements.py”, change line 4 from

> from trilobot import Trilobot

Into

> import trilobot

And try to run movements.py again…  
This is just to make sure that the library you try to call in movements.py actually exists…

Rather than importing a class you import the whole library.

---

<div class="post-metadata">

### Author: ![m1cr0py7h0n](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/m1cr0py7h0n/32/11507_2.png) [@m1cr0py7h0n](https://forums.pimoroni.com/u/m1cr0py7h0n)
#### Post date: [February 23, 2025, 11:39am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/5 "2025-02-23T11:39:52Z")

</div>

also, follow [this thread](https://forums.pimoroni.com/t/whats-missing-from-pi-os-lite/19579), as this seems to be trilobot related.

Also, it might be worth to contact [Kevin Mcalleer](https://www.kevsrobots.com/about/bio), as he is an expert in robotics and has a relation to Pimoroni…

---

<div class="post-metadata">

### Author: ![m1cr0py7h0n](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/m1cr0py7h0n/32/11507_2.png) [@m1cr0py7h0n](https://forums.pimoroni.com/u/m1cr0py7h0n)
#### Post date: [February 23, 2025, 11:43am UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/6 "2025-02-23T11:43:09Z")

</div>

…it just came to my mind that with the latest PiOS you need to install all stuff into a dedicated (and proper) environment…if not, it won’t run…

---

<div class="post-metadata">

### Author: ![Eli](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Eli](https://forums.pimoroni.com/u/Eli)
#### Post date: [February 23, 2025, 12:16pm UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/7 "2025-02-23T12:16:22Z")

</div>

Thanks! I’m not sure how to do this. Any tips?

---

<div class="post-metadata">

### Author: ![Eli](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Eli](https://forums.pimoroni.com/u/Eli)
#### Post date: [February 23, 2025, 12:51pm UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/8 "2025-02-23T12:51:38Z")

</div>

Also I just did the changes to line 4 and the same error came up

---

<div class="post-metadata">

### Author: ![m1cr0py7h0n](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/m1cr0py7h0n/32/11507_2.png) [@m1cr0py7h0n](https://forums.pimoroni.com/u/m1cr0py7h0n)
#### Post date: [February 23, 2025, 2:59pm UTC](https://forums.pimoroni.com/t/no-module-named-trilobot/27365/9 "2025-02-23T14:59:27Z")

</div>

> [@Eli](#):
>
> line 4 and the same error came up

Is it exactly the error

> ModuleNotFoundError: No module named ‘trilobot’

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](https://pimoroni.github.io/venv-python/), [here](https://forums.pimoroni.com/t/why-do-i-need-virtual-python-environment/27250/3) and [here](https://www.raspberrypi.com/documentation/computers/os.html#install-python-libraries-using-pip)…

Basically, this is a four-step-process

1. create virtual env (if not already existing)
2. Activate virtual env for all further actions
3. install again everything as above as regular (but this time in the activated env)
4. 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…?
