nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.15k stars 336 forks source link

Module Not Found Error Raspberry Pi #38

Closed smallramsbottom closed 4 years ago

smallramsbottom commented 5 years ago

ImportError: No module named 'pyttsx3' This is python 3.5.3 on my RPi3. Any idea how to fix it?

josephalway commented 5 years ago

That sounds like you don't have it installed correctly. Do you indeed have it installed?

thearduinoguy commented 5 years ago

I have the exact same error

Installed with pip install pyttsx3

thearduinoguy commented 5 years ago

Fixed with.. sudo apt-get install python-espeak

josephalway commented 5 years ago

Ah, that's interesting. Hopefully they were able to get that straightened out.

AbeerBPi commented 5 years ago

not working even with thearduinoguy's fix

AbeerBPi commented 5 years ago

help plz

josephalway commented 5 years ago

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.

jackryan135 commented 5 years ago

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.'"

josephalway commented 5 years ago

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

nateshmbhat commented 4 years ago

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

d-f-clark commented 3 years ago

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.

d-f-clark commented 3 years ago

The 3/16/2020 response doesn’t work either, same results on Raspbian with python3, fails at import.