[index-tts]Window11 编译到building '_pywrapfst' extension 报错error: Microsoft Visual C++ 14.0 or greater is required

2025-10-28 865 views
8
      copying pynini\export\grm_py_build_defs.bzl -> build\lib.win-amd64-cpython-310\pynini\export
      copying pynini\export\py.typed -> build\lib.win-amd64-cpython-310\pynini\export
      copying pynini\lib\BUILD.bazel -> build\lib.win-amd64-cpython-310\pynini\lib
      copying pynini\lib\py.typed -> build\lib.win-amd64-cpython-310\pynini\lib
      running build_ext
      building '_pywrapfst' 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/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pynini
Failed to build pynini
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pynini)

Image

回答

7

你试试 把requirements.txt 里面这一行 删了或者注释 WeTextProcessing # arm机器如果安装失败,请注释此行 运行 conda install -c conda-forge pynini=2.1.6 pip install WeTextProcessing --no-deps

1

试过了,还是会卡在这个地方。。

4
Windows 11 安裝步驟

在PowerShell輸入wsl --install下載Ubuntu應用

在Windows Start開啓Ubuntu應用 創建Ubuntu本地賬號,密碼輸入時不會顯示*

按次序輸入以下内容:

安裝ffmpeg

sudo apt update && sudo apt upgrade -y
sudo apt install git wget ffmpeg -y

安裝Conda

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

創建Conda環境

conda create -n index-tts python=3.10 -y
conda activate index-tts

複製此GitHub repository到本地

git clone https://github.com/index-tts/index-tts.git
cd index-tts

下載依賴 pip install -r requirements.txt

下載模型

wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/bigvgan_discriminator.pth -P checkpoints
wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/bigvgan_generator.pth -P checkpoints
wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/bpe.model -P checkpoints
wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/dvae.pth -P checkpoints
wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/gpt.pth -P checkpoints
wget https://huggingface.co/IndexTeam/Index-TTS/resolve/main/unigram_12000.vocab -P checkpoints

運行程式 python webui.py

每次使用步驟

開啓Ubuntu應用

cd index-tts
conda activate index-tts
python webui.py
其他

以上步驟是我根據ChatGPT回答簡化,實測有效。 Windows好像下載不了pynini依賴,儘管下載Visual C++ 14.0也會報錯。

我沒用過Conda,不熟悉Linux,只是遇到同樣的問題才回覆。 不確保每個步驟安全可靠,這個回答只供參考。

9

多谢靓仔,我试一下