user14259430
user14259430

Reputation:

pyttsx3.init() give an error in python 3.9

I tried below code:

>>> import pyttsx3
>>> engine = pyttsx3.init()
>>> engine.say('hello')
>>> engine.runAndWait()

But it give me an error as below:

import pywintypes
ModuleNotFoundError: No module named 'pywintypes'

I already tried this to solve:

pip install pypiwin32
python -m pip install pywin32
pip install -U pypiwin32
python -m pip install pyttsx3==2.71

But not any one work for me. I'm using win10 can anyone help me?

Upvotes: 0

Views: 1346

Answers (1)

dea
dea

Reputation: 26

If you want to use pyttsx3 in python 3 you have to use pip3 not pip to install the packages. It won't work with pip. pip works for python2 only.

Try the following:

pip3 install pywin32 pypiwin32 pyttsx3

This should work

Upvotes: 1

Related Questions