안녕 '을 초기화하기'에는 속성이 없습니다 그리고이 오류가 얻을 :Pyttsx : AttributeError : '모듈'개체 미리</p> <pre><code>import pyttsx engine = pyttsx.init() engine.say('Hello World') engine.runAndWait() </code></pre> <p>에있는 모든 사람 덕분에
Traceback (most recent call last):
File "C:\Users\xxx\eclipse\workspace\Ai_Project\AI\Ai_Brain.py", line 8, in <module>
engine = pyttsx.init()
AttributeError: 'module' object has no attribute 'init'
내가 사용 Windows 7에서 오전 파이썬 2.7 및 Eclipse 네온. 어떤 종류의 호환성 문제입니까? 나는 관련 질문을 많이 검색 한하지만 내 경우에 대한 답변을 적용하면 pyttsx
모듈을 가져온 후 오류
작업 디렉토리에 pyttsx.py가 있습니까? – gushitong
내 작업 영역 폴더에 있다는 뜻입니까? 아니 거기에 2 파일 _init_.py 및 AI_Brain.py 있습니다. Python 설치시 pyttsx를 설치했는지 여부를 나타내는 경우 예입니다. –