Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

Failed to build fairseq pyworld

Open narendnp opened this issue 1 year ago • 7 comments

...
running build_ext
      building 'fairseq.libbleu' 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 fairseq
  Building wheel for pyworld (pyproject.toml) ... error
  error: subprocess-exited-with-error
...
[1/1] Cythonizing pyworld\pyworld.pyx
      building 'pyworld.pyworld' 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 pyworld
Failed to build fairseq pyworld
ERROR: Could not build wheels for fairseq, pyworld, which is required to install pyproject.toml-based projects

Here's my env:

  • Windows 10 22H2 (19045.4780)
  • Python 3.11.0 running on conda (miniconda3)
  • pip 24.0
  • Visual C++ Build Tools already installed

I also have checked #786 and made sure the requirement for pyworld is pyworld==0.3.2.

narendnp avatar Aug 15 '24 05:08 narendnp

I had the same problem(and successfully solved it), although I don't use conda. The solution took a few steps and it would help me if you sent a bit more error logs. Without more information, I suggest you try using a different version of python (3.10.0rc1 worked in my case) and maybe try using vanilla python

KirGear avatar Aug 17 '24 21:08 KirGear

I had the same problem(and successfully solved it), although I don't use conda. The solution took a few steps and it would help me if you sent a bit more error logs. Without more information, I suggest you try using a different version of python (3.10.0rc1 worked in my case) and maybe try using vanilla python

I tried using Python 3.10.0rc1 (without conda, pip version is still the same) and this is the error I got instead:

Building wheels for collected packages: fairseq, ffmpy, antlr4-python3-runtime
  Building wheel for fairseq (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for fairseq (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1423 lines of output]
      C:\Users\Narend\AppData\Local\Temp\pip-build-env-cs9rp003\overlay\Lib\site-packages\setuptools\_distutils\dist.py:268: UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\fairseq
...
...
copying fairseq\config\model\wav2vec2\wav2vec2_base.yaml -> build\lib.win-amd64-cpython-310\fairseq\config\model\wav2vec2
      copying fairseq\config\model\wav2vec2\wav2vec2_large.yaml -> build\lib.win-amd64-cpython-310\fairseq\config\model\wav2vec2
      running build_ext
      building 'fairseq.libbleu' 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 fairseq
  Building wheel for ffmpy (pyproject.toml) ... done
  Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5600 sha256=58f7d30dd3b578d5476abc677d08f01fa69be369e22316b4c1f489c64d849757
  Stored in directory: c:\users\narend\appdata\local\pip\cache\wheels\01\a6\d1\1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf
  Building wheel for antlr4-python3-runtime (pyproject.toml) ... done
  Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.8-py3-none-any.whl size=141217 sha256=f65ccc739a61eeb1c1f80dac2ac6216a97e72f65aec3c0ef4f91e6638625da05
  Stored in directory: c:\users\narend\appdata\local\pip\cache\wheels\a7\20\bd\e1477d664f22d99989fd28ee1a43d6633dddb5cb9e801350d5
Successfully built ffmpy antlr4-python3-runtime
Failed to build fairseq
ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects

It seems like the pyworld build error gone, but fairseq still fails.

narendnp avatar Aug 18 '24 12:08 narendnp

I have the same problem and am running vanilla python, hoping for a solution.

D-a-r-n-o-l-d avatar Aug 22 '24 20:08 D-a-r-n-o-l-d

Using Python 3.8 as mentioned in the README caused issues with OmegaConf. Using Python 3.10 caused issues with Fairseq unless pip is version 24 (or lower?).

I had to run the instance on Vast.ai with the following steps:

conda create -n rvc python=3.10 conda activate rvc

pip install pip==24.0

sudo apt install ffmpeg pip install torch torchvision torchaudio pip install -r requirements.txt python tools/download_models.py python3 infer-web.py --colab

Hope this helps!

frdcmp avatar Sep 15 '24 19:09 frdcmp

Using Python 3.8 as mentioned in the README caused issues with OmegaConf. Using Python 3.10 caused issues with Fairseq unless pip is version 24 (or lower?).

I had to run the instance on Vast.ai with the following steps:

conda create -n rvc python=3.10 conda activate rvc

pip install pip==24.0

sudo apt install ffmpeg pip install torch torchvision torchaudio pip install -r requirements.txt python tools/download_models.py python3 infer-web.py --colab

Hope this helps!

Hey @frdcmp thanks for the insight! Quick question, did you do anything else, like for example installing the C++ Build Tools? I feel like I followed more or less the same steps as you, but I always get error on fairseq (and/or pyworld) when installing requirements through pip.

narendnp avatar Sep 16 '24 00:09 narendnp

I experienced the same issue on Windows and resolved it by installing the latest Microsoft Visual C++ Build Tools. Make sure to select "Desktop Development with C++" under workload and keep the other default options checked in the pre-installation set up. You can see an example in this comment from #2170

Deep0Thinking avatar Jan 20 '25 09:01 Deep0Thinking

I got it working, I had to downgrade pip to v24.0 and install build essential tools. I'm using conda, python v.3.8.20, pip v24.0

sudo apt update

conda install pip=24.0 sudo apt install build-essential sudo apt ffmpeg // I also did this but not sure this is apart of the solution

userhonda avatar Apr 22 '25 17:04 userhonda