尝试安装pyttsx3库时出错

时间:2020-06-28 15:08:15

标签: python cmd pip pyttsx

当我收到此错误以及我包含的非常胖的红色代码时,我正在尝试在Windows 10上使用pip安装pyttsx3

Collecting comtypes; platform_system == "Windows"
  Using cached comtypes-1.1.7.zip (180 kB)
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```


[1]: https://i.stack.imgur.com/xRdBx.png

2 个答案:

答案 0 :(得分:2)

尝试更新设置工具,然后重试安装:

pip install -U setuptools
pip install pyttsx3

如果不能解决您的问题,您也可以尝试指定pyttsx3的版本

pip install -U pyttsx3==2.71

如果这也行不通,请尝试直接从官方github存储库中直接安装它:

pip install git+https://github.com/nateshmbhat/pyttsx3

如果仍然无法正常工作,请考虑更改python版本。

答案 1 :(得分:0)

我认为这可以解决您的问题

pip install wheel

然后

pip install pyttsx3