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?
I've had a similar issue with pyttsx3. I downgraded to Python 3.7, then it worked fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.