“ ModuleNotFoundError:没有名为'engine'的模块”的原因是什么,怎么解决?

时间:2019-09-24 16:36:08

标签: python-3.x cmd

当我尝试运行代码时发生此错误:

Traceback (most recent call last):
File "c:\Users\loveislife\Desktop\PyProject\J.A.R.V.I.S - Copy\script.py", line 83, in <module>
import pyttsx
File "C:\Users\loveislife\AppData\Local\Programs\Python\Python37\lib\site- 
packages\pyttsx\__init__.py", 
line 18, in <module>
from engine import Engine
ModuleNotFoundError: No module named 'engine'.

当我打开cmd提示导入引擎时发生此错误:

C:\Users\loveislife>pip install engine
Collecting engine
  ERROR: Could not find a version that satisfies the requirement engine (from versions: none)
ERROR: No matching distribution found for engine

我该如何解决?

1 个答案:

答案 0 :(得分:0)

从Google尝试安装并导入pyttsx3(这是python 3的更新版本,并且应该可以使用)。