当我编写此代码时:
import pyttsx
engine = pyttsx.init()
engine.say('hello world ')
engine.runAndWait()
我遇到这个问题
File "C:/Users/youssef123/PycharmProjects/fgq/ghqsd.py", line 1, in <module>
import pyttsx
File "C:\Users\youssef123\PycharmProjects\fgq\venv\lib\site-packages\pyttsx\__init__.py", line 18, in <module>
from engine import Engine
ModuleNotFoundError: No module named 'engine'
请问我该如何解决
答案 0 :(得分:0)
对于Python3,请通过
安装最新版本pip3 install pyttsx3
和进行编码调用
import pyttsx3