0

I've been making simple "voice assistant". I imported pyttx3 using pip install pyttx3(and yes i added import pyttsx3 in the code), which successfully installed due to terminal outprint Successfully installed pyttsx3-2.90 but then when i try to run the code i get File "c:\Users\teeki\voiceassistant\va.py", line 1, in <module> import pyttsx3 ImportError: No module named pyttsx3

I already tried to lookup the problem, found some solutions, which didnt do anything for me. Some of things i tried:

  1. reinstalling pyttsx3 with pip uninstall pyttsx3 then installing it again
  2. Installing it with pipenv
  3. Changing python interpeter back and forth to 2.7, 3.8, 3.9

EDIT:im using visual studio code

Tian
  • 11
  • 2

2 Answers2

0

You can try py -m pip install pyttsx3. Also, make sure that it is installed into your PATH.

If that doesn't work, try pip3 install pyttsx3.

The Pilot Dude
  • 2,091
  • 2
  • 6
  • 24
  • Okay yes, i think it did the trick with `py -m pip install pyttsx3` as now i get same error for next import (speech_recognition as sr). I tried to install it the same way and it works. Thanks for the help – Tian Mar 13 '21 at 13:28
0

Yes this is a known issue for pyttsx3 version 2.90

You can fix it by simply uninstalling pyttsx3 and reinstalling version 2.71

> pip uninstall pyttsx3

> pip install pyttsx3==2.71
Max Shouman
  • 1,333
  • 1
  • 4
  • 11
  • I tried to do that, but still didn't work, after i tried `py -m pip install pyttsx3` and it works fine now. Thanks for helping me out – Tian Mar 13 '21 at 13:29