Skip to content
Advertisement

AttributeError: module ‘pyttsx3’ has no attribute ‘init’ [closed]

First of all, I’m using:

  • Windows 10
  • Python 3.6.2 (but I’ve tried with Python 3.5.4 too)
  • pyttsx3 module

I’m trying to use pyttsx3 but I just can’t initialize it, with the official code examples.

My code (just like the examples from here and here):

JavaScript

And the second line gives me this error:

AttributeError: module ‘pyttsx3’ has no attribute ‘init’

I installed it with PIP:

JavaScript

And I tried to fix it installing pypiwin32 but it still doesn’t work:

JavaScript

When I execute the following script:

JavaScript

I get this:

JavaScript

There is this:

JavaScript

At:

JavaScript

And the contents of the file __init__.py (I omitted comments):

JavaScript

Advertisement

Answer

It appears that the module pyttsx3 is not properly initialised. I hope you don’t have a file named pyttsx3.py anywhere in the module path. I found a related issue here.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement