ModuleNotFoundError:没有名为“ pyttsx3”的模块

时间:2020-11-03 03:45:18

标签: python pyttsx3

我正在运行Sublime文本程序,但出现错误:

ModuleNotFoundError: No module named 'pyttsx3'

我打开命令提示符并输入:pip install pyttsx3,这就是我所得到的

Collecting pyttsx3
  Using cached pyttsx3-2.90-py3-none-any.whl (39 kB)
Collecting comtypes; platform_system == "Windows"
  Using cached comtypes-1.1.7.zip (180 kB)
Requirement already satisfied: pywin32; platform_system == "Windows" in c:\users\claud\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyttsx3) (228)
Requirement already satisfied: pypiwin32; platform_system == "Windows" in c:\users\claud\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyttsx3) (223)
Using legacy 'setup.py install' for comtypes, since package 'wheel' is not installed.
Installing collected packages: comtypes, pyttsx3
    Running setup.py install for comtypes ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\claud\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\claud\\AppData\\Local\\Temp\\pip-install-zam0bo68\\comtypes\\setup.py'"'"'; __file__='"'"'C:\\Users\\claud\\AppData\\Local\\Temp\\pip-install-zam0bo68\\comtypes\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\claud\AppData\Local\Temp\pip-record-zh7s3m6p\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\claud\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\comtypes'
         cwd: C:\Users\claud\AppData\Local\Temp\pip-install-zam0bo68\comtypes\

1 个答案:

答案 0 :(得分:0)

我确实修复了它。 首先,我通过这里升级了pip版本 C:\ Users \ claud \ AppData \ Local \ Microsoft \ WindowsApps \ PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0 \ python.exe

并遵循以下说明: https://pip.pypa.io/en/stable/installing/

之后,很容易进行pip安装pyttsx3