使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”

03-13 阅读 0评论

问题描述

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”错误,尝试了各种方法失败

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,访问,安装,第1张
(图片来源网络,侵删)

命令:

pip install TTS -i https://pypi.tuna.tsinghua.edu.cn/simple

结果:

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for TTS
Failed to build TTS
ERROR: Could not build wheels for TTS, which is required to install pyproject.toml-based projects
[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip

解决办法

于是尝试下载安装包TTS-0.11.1.tar.gz,在本地安装,pypi.org

解压后,如下:

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”

使用CMD,进入到上面的路径,运行:python setup.py install, 不成功!

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,访问,安装,第3张
(图片来源网络,侵删)
D:\TTS-0.11.1>python setup.py install
Traceback (most recent call last):
  File "D:\TTS-0.11.1\setup.py", line 26, in 
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

注意:到安装路径下有requirements文件,换一种方式安装:

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

安装结果:

....
Successfully installed Babel-2.11.0 Jinja2-3.1.2 MarkupSafe-2.1.2 Werkzeug-2.2.3 anyascii-0.3.1 appdirs-1.4.4 audioread-3.0.0 certifi-2022.12.7 cffi-1.15.1 
charset-normalizer-3.0.1 click-8.1.3 colorama-0.4.6 contourpy-1.0.7 coqpit-0.0.17 cycler-0.11.0 cython-0.29.28 dateparser-1.1.7 decorator-5.1.1 docopt-0.6.2 
flask-2.2.3 fonttools-4.38.0 fsspec-2023.1.0 g2pkk-0.1.2 gruut-2.2.3 gruut-ipa-0.13.0 gruut_lang_de-2.0.0 gruut_lang_en-2.0.0 idna-3.4 inflect-5.6.0 
itsdangerous-2.1.2 jamo-0.4.1 jieba-0.42.1 joblib-1.2.0 jsonlines-1.2.0 kiwisolver-1.4.4 librosa-0.8.0 llvmlite-0.38.1 matplotlib-3.7.0 mecab-python3-1.0.5 
networkx-2.8.8 nltk-3.8.1 num2words-0.5.12 numba-0.55.2 numpy-1.22.4 pandas-1.5.3 pillow-9.4.0 pooch-1.6.0 protobuf-3.19.6 psutil-5.9.4 
pycparser-2.21 pynndescent-0.5.8 pyparsing-3.0.9 pypinyin-0.48.0 pysbd-0.3.4 python-crfsuite-0.9.9 python-dateutil-2.8.2 pytz-2022.7.1 pytz-deprecation-shim-0.1.0.post0 
pyyaml-6.0 regex-2022.10.31 requests-2.28.2 resampy-0.4.2 scikit-learn-1.2.1 scipy-1.10.1 six-1.16.0 soundfile-0.12.1 tensorboardX-2.6 threadpoolctl-3.1.0 
torch-1.13.1 torchaudio-0.13.1 tqdm-4.64.1 trainer-0.0.20 typing-extensions-4.5.0 tzdata-2022.7 tzlocal-4.2 umap-learn-0.5.1 unidic-lite-1.0.8 urllib3-1.26.14

再次运行python setup.py install,不成功,提示:Microsoft Visual C++ 14.0 or greater is required

...
building 'TTS.tts.utils.monotonic_align.core' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

按照提示,访问https://visualstudio.microsoft.com/visual-cpp-build-tools, 下载Microsoft C++ 生成工具并安装:

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,访问,安装,第6张
(图片来源网络,侵删)

安装所需要的空间大约为7.5GB

安装完成后,再次运行python setup.py install,运行成功,结果如下:

...
Using c:\users\carino\appdata\local\programs\python\python310\lib\site-packages
Finished processing dependencies for TTS==0.11.1

使用pip list查看安装的库列表:

使用pip install安装TTS库,报“ERROR: Could not build wheels for tts, which is required to install pyproject”

安装成功


免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,人围观)

还没有评论,来说两句吧...

目录[+]