Closed smallramsbottom closed 4 years ago
That sounds like you don't have it installed correctly. Do you indeed have it installed?
I have the exact same error
Installed with pip install pyttsx3
Fixed with.. sudo apt-get install python-espeak
Ah, that's interesting. Hopefully they were able to get that straightened out.
not working even with thearduinoguy's fix
help plz
Need more information to provide help. "ImportError: No module named 'pyttsx3'" is a pretty generic error. The full error along with example code that leads to the error would be helpful in trying to figure out what isn't working.
I am having the same issue currently. I installed pyttsx3 on a Raspberry Pi 3B+ a few months ago and had no problems with running it. Today, I installed it on a fresh SD card with a new installation of Raspbian Stretch and ran both sudo apt-get install python-espeak
and sudo pip3 install pyttsx3
, with both installs completing correctly with no errors. When using the interpreter with python3 I have no problem importing pyttsx3, yet in a python file, even when that import is the first line of the program, it errors out with "No module named 'pyttsx3.'"
When you run the python script file are you using python or python3 to run your script?
Use Python 2.X to run the script:
python my_script.py
Use Python 3.X to run the script:
python3 my_script.py
Install this using the python 3 executable like this :
python3 -m pip install pyttsx3
Also try installing espeak
and python-espeak
:
sudo apt-get install python-espeak
sudo apt-get update && sudo apt-get install espeak
Giving up on this package. On Raspbian Buster “pip3 list” reports that pyttsx3 is installed but the import statement can’t find it. Attempting “pip3 uninstall pyttsx3” reports that pyttsx3 is not installed.
The 3/16/2020 response doesn’t work either, same results on Raspbian with python3, fails at import.
ImportError: No module named 'pyttsx3' This is python 3.5.3 on my RPi3. Any idea how to fix it?