当我运行直接来自网站的代码时
import pyttsx
engine = pyttsx.init()
engine.say('Greetings!')
engine.say('How are you today?')
engine.runAndWait()
我收到此错误:
Traceback (most recent call last):
File "C:/Python27/pyttsx.py", line 1, in <module>
import pyttsx
File "C:/Python27\pyttsx.py", line 2, in <module>
engine = pyttsx.init()
AttributeError: 'module' object has no attribute 'init'
我在使用 Python 2.7 的 Windows 7 上,我使用了easy_install来安装它。任何帮助表示赞赏