无法安装pyttsx3(文字语音模块)

时间:2020-03-25 11:23:43

标签: python pip pyttsx

我无法使用pip安装pyttsx3软件包。 我尝试了pip install pyttsx3,但无法安装。

C:\Users\yashr\Desktop\SOFTWARES\brother> pip install pyttsx3
Collecting pyttsx3
  Using cached https://files.pythonhosted.org/packages/f4/20/f6c582c5f2735ca5c55ae52f1ddbc7447fb3565b5ac2fdc24a8d534f4aa1/pyttsx3-2.84-py3-none-any.whl
Collecting pyobjc>=2.4 (from pyttsx3)
  Using cached https://files.pythonhosted.org/packages/b1/c9/83b256bb7f771a9e4232518005d6f237ae79215283cf5ea234141751b36a/pyobjc-6.1-py3-none-any.whl
Collecting comtypes; "win32" in sys_platform (from pyttsx3)
  Using cached https://files.pythonhosted.org/packages/fb/b8/f8aa21774acb4535e32f6a89055876ca497ff806f9b1b1912b469284a61e/comtypes-1.1.7.zip
Collecting pyobjc-framework-WebKit==6.1 (from pyobjc>=2.4->pyttsx3)
  Using cached https://files.pythonhosted.org/packages/f1/64/353b9512c0dddb0159a17a231a9e3bdb594d7d891ffd74d0b26ee629d7b3/pyobjc-framework-WebKit-6.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\yashr\AppData\Local\Temp\pip-install-hxvtccap\pyobjc-framework-WebKit\setup.py", line 27, in <module>       
        for fn in os.listdir("Modules")
      File "C:\Users\yashr\AppData\Local\Temp\pip-install-hxvtccap\pyobjc-framework-WebKit\pyobjc_setup.py", line 408, in Extension
        os_level = get_os_level()
      File "C:\Users\yashr\AppData\Local\Temp\pip-install-hxvtccap\pyobjc-framework-WebKit\pyobjc_setup.py", line 218, in get_os_level
        pl = plistlib.readPlist("/System/Library/CoreServices/SystemVersion.plist")
      File "c:\users\yashr\appdata\local\programs\python\python37\lib\plistlib.py", line 99, in readPlist
        with _maybe_open(pathOrFile, 'rb') as fp:
      File "c:\users\yashr\appdata\local\programs\python\python37\lib\contextlib.py", line 112, in __enter__
        return next(self.gen)
      File "c:\users\yashr\appdata\local\programs\python\python37\lib\plistlib.py", line 82, in _maybe_open
        with open(pathOrFile, mode) as fp:
    FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\yashr\AppData\Local\Temp\pip-install-hxvtccap\pyobjc-framework-WebKit\
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

在安装pyttsx3软件包方面,我将提供一些帮助。

3 个答案:

答案 0 :(得分:0)

尝试以下命令:

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

来自here

答案 1 :(得分:0)

如果您使用的是Mac,请尝试pip3安装pyttsx3。如果您在Windows上,请尝试将其粘贴到终端-pip install git + git://github.com/nateshmbhat/pyttsx3.git

如果这行不通-请查看PyPa文档,他们将以更好的方式进行解释。

答案 2 :(得分:0)

请使用以下命令。

data-default-file