lawre6b3
lawre6b3

Reputation: 89

PYTTSX Error: Cannot find module named drivers

I am still a novice when it comes to python, and recently I have attempted to construct a personal assistant. I am using the PyTTSX module, but when I attempt to initialize the package, I receive this error:

****File "C:\Python34\lib\site-packages\pyttsx\driver.py", line 64, in init self._module = import(name, globals(), locals(), [driverName]) ImportError: No module named 'drivers**'**

Any feedback would be greatly appreciated.

Upvotes: 1

Views: 4359

Answers (2)

Natesh bhat
Natesh bhat

Reputation: 13202

There is now a python3 compatible version of pyttsx and is called pyttsx3

just use pip install pyttsx3

Its usage is almost same as that of pyttsx

import pyttsx3
engine  = pyttsx3.init()
engine.say("hello")
engine.runAndWait()

Upvotes: 2

Huzefa Mandviwala
Huzefa Mandviwala

Reputation: 112

You've probably downloaded the version of PyTTSX from the website, which was built for Python 2. The updated version can be found on GitHub here. Copy the contents of pyttsx/pyttsx into your pythonXX/Lib/site-packages/pyttsx folder and you should be good to go.

Upvotes: 1

Related Questions