0

So essentially I'm trying to figure out why a module, called "pyttsx3" is installed, but for some reason in VS code it refuses to run and gives me the error code ModuleNotFoundError: No module named 'pyttsx3', however when I look at my list of installed modules, pyttsx3 is in fact installed? I've been trying to get it to work with this minimal reproducible example taken directly from the git-hub for this python module as an example piece of code:

import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()

Anyone have any thoughts on this? It seems rather odd to me that it wont import despite the fact that it is installed?

WIldflower42
  • 83
  • 1
  • 8
  • Modules for different Python versions are seperated. You have to install it for the interpreter configured in the IDE. – Klaus D. Jul 31 '20 at 21:12
  • @KlausD So I just tried that and it said it was already installed, any more thoughts? I also only have python 3.8 installed I believe, however I also installed anaconda so I'm not sure if there are additional versions because of that – WIldflower42 Jul 31 '20 at 21:16
  • I recommend simply using python 3.6 for any projects involving pyttsx3 because it supports tons of libraries. – Redgar Tech Aug 18 '20 at 04:02

1 Answers1

0

I've had a similar issue with pyttsx3. I downgraded to Python 3.7, then it worked fine.

thomin
  • 81
  • 5
  • I found that I had an Anaconda environment which was where some packages where heading too! Thank you so much for your help though! – WIldflower42 Aug 25 '20 at 14:17