1

Im trying to run this code but for some reason it gives me this error:

 File "main.py", line 35, in <module>
    engine = pyttsx3.init()
  File "pyttsx3\__init__.py", line 22, in init
  File "pyttsx3\engine.py", line 30, in __init__
  File "pyttsx3\driver.py", line 50, in __init__
  File "importlib\__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pyttsx3.drivers.sapi5'

I used a fix by doing pyinstaller --onefile --hidden-import=pyttsx3.drivers main.py but now I got this error ModuleNotFoundError: No module named 'pyttsx3.drivers.sapi5'. Can anyone help?

  • Check [this](https://github.com/nateshmbhat/pyttsx3/issues/6#issuecomment-360284720) post on github, you might want to make an hidden import of that as well. – astqx Jan 17 '21 at 23:57

0 Answers0