drxtal
October 22, 2025, 10:28pm
1
Hi, when I try to run the python code in lessons 14 and 15 (TTS to speech) I get the follow error
ModuleNotFoundError: No module named ‘pidog.tts’
I have installed all the modules in lesson 5 and the commands below work from the terminal
espeak “Hello world”
pico2wave -w test.wav “Hello world” && aplay test.wav
Hello,
Check that you have pidog.tts in the same directory where you run the script, maybe this is the problem, it’s just an idea, I’m not an expert.
Our installation instructions were not fully updated.
We recommend that you reinstall the system and then install all the library code by following these commands:
Install robot-hat:
cd ~/
git clone -b 2.5.x GitHub - sunfounder/robot-hat: Robot Hat python library --depth 1
cd robot-hat
sudo python3 install.py
Install vilib:
cd ~/
git clone GitHub - sunfounder/vilib: Vision library for python
cd vilib
sudo python3 install.py
Install pidog:
cd ~/
git clone -b dev GitHub - sunfounder/pidog: Raspberry Pi Robot Dog from SunFounder --depth 1
cd pidog
sudo pip3 install . --break-system-packages
Run i2samp.sh:
cd ~/robot-hat
sudo bash i2samp.sh
After completing the installation, please try running the tutorial examples again to see if it works.
drxtal
October 25, 2025, 11:00am
4
Thank you both for suggestions
I have reinstalled the system but still get the same error. I am currently running it from ~/pidog but I have tried a few other directories including ~/pidog/pidog with no luck. The terminal tells me I have installed pidog-1.3.9
To better assist you with the installation issue, could you please provide us with the following information:
System Version: Which specific version of the operating system are you trying to install?
Process Followed: Did you follow the installation instructions we provided step by step?
Providing these details will help us quickly identify the cause and provide you with an accurate solution.
drxtal
October 27, 2025, 8:50pm
6
Hi
Thank you for getting back to me so quickly
System version: Debian GNU/Linux 13 (trixie)
I reformatted the card, reinstalled the OS and followed the instructions.
I have a folder pidog and all other examples work well
drxtal
October 27, 2025, 8:53pm
7
Examples up to 13 work well, but nothing from 14 onwards.
Which part of Lesson 14 are you working on?
Are you getting any errors with the sample program?
If yes, please send us a screenshot of the error so we can help you fix it.
drxtal
October 29, 2025, 8:55pm
9
Yes, I get the error below when I run the script test_tts_espeak.py
Traceback (most recent call last):
File “/home/drxtal/pidog/examples/test_tts_espeak.py”, line 1, in
from pidog.tts import Espeak
ModuleNotFoundError: No module named ‘pidog.tts’
I downloaded pidog from GitHub - github/docs: The open-source repo for docs.github.com
Sorry the previous installation command for PiDog was incorrect. Please use the following instructions to install PiDog:
cd ~
sudo rm -rf pidog
git clone -b dev https://github.com/sunfounder/pidog.git --depth 1
cd pidog
sudo pip3 install . --break
After the PiDog library is successfully installed, restart your system, and then run the examples to see how it works.
Alternatively, we recommend reinstalling the system and then installing all libraries as follows:
cd ~/
git clone -b 2.5.x GitHub - sunfounder/robot-hat: Robot Hat python library --depth 1
cd robot-hat
sudo python3 install.py
cd ~/
git clone GitHub - sunfounder/vilib: Vision library for python
cd vilib
sudo python3 install.py
cd ~
sudo rm -rf pidog
git clone -b dev GitHub - sunfounder/pidog: Raspberry Pi Robot Dog from SunFounder --depth 1
cd pidog
sudo pip3 install . --break
Remember: The correct command is sudo pip3 install . --break, not sudo pip3 install . --break-system-packages.
cd ~/robot-hat
sudo bash i2samp.sh
1 Like
drxtal
October 31, 2025, 10:47pm
11
Thank you. It now works with the reinstallation