RVC-Project / Retrieval-based-Voice-Conversion-WebUI

Easily train a good VC model with voice data <= 10 mins!
MIT License
24.92k stars 3.65k forks source link

Failed to build fairseq #1103

Open tanLeePops opened 1 year ago

tanLeePops commented 1 year ago

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=5601 sha256=ca306d4d7cc932fbffeb89d4db524a83d2854e32a3269922675ed6b3f86533dd Stored in directory: c:\users\lapdu\appdata\local\pip\cache\wheels\75\a3\1a\2f3f90b9a4eb0408109ae1b5bae01efbdf8ab4ef98797433e4 Building wheel for audioread (pyproject.toml) ... done Created wheel for audioread: filename=audioread-3.0.0-py3-none-any.whl size=23737 sha256=60837ef1d8820c48255c922ae3427f38abb8cf9706bd3f0ff827be2fc202f80c Stored in directory: c:\users\lapdu\appdata\local\pip\cache\wheels\0a\ed\be\49df2538fca496690a024a4374455584d65c2afd6fc3d6e9c7 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=356a3e3638f8dd4c028c3656494649c1eba555d2df087b1ff15e25c8baedc981 Stored in directory: c:\users\lapdu\appdata\local\pip\cache\wheels\c8\d0\ab\d43c02eaddc5b9004db86950802442ad9a26f279c619e28da0 Building wheel for future (pyproject.toml) ... done Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492054 sha256=a1e193816efe49bf96abe3e7a38c45c5cdd7b9a45f9e50c0e2f0f392b8c0fd90 Stored in directory: c:\users\lapdu\appdata\local\pip\cache\wheels\a0\0b\ee\e6994fadb42c1354dcccb139b0bf2795271bddfe6253ccdf11 Successfully built ffmpy audioread antlr4-python3-runtime future Failed to build fairseq ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects PS C:\Users\lapdu\Desktop\RVC0813Nvidia>

Can someone help me adress this issue regarding "Failed to build fairseq" issue?

PatrickAi01 commented 1 year ago

same issue, it is saying it cannot build wheel during the faireseq

mrhelixx commented 1 year ago

Install Microsoft Visual C++ Build Tools:

Go to the Visual Studio downloads page. Or maybe you already have Visual Studio Installer on your CPU? Open it. I use Visual Studio Community 2019 If you have it already click modify. Download and install the "Build Tools for Visual Studio" if you don't have it. During installation, under "Workloads", select "C++ build tools" and ensure the latest versions of "MSVCv142 - VS 2019 C++ x64/x86 build tools" and "Windows 10 SDK" are selected. OR go to individual components and find those two listed Complete the installation.

Reinstall the Dependencies:

After installing the Visual C++ Build Tools, try installing the dependencies again. Make sure you're in the rvc_webui environment:

conda activate rvc_webui (or whatever you called your conda env if you used one.) pip install -r requirements.txt python app.py

RVC-Boss commented 1 year ago

ā†‘ is right. You should install vc++ first.

We're planning removing the dependency of fairseq in the next versions.

tanLeePops commented 1 year ago

Thank You @mrhelixx that solved the problem šŸ‘Œ

iromam commented 1 year ago

and on mac? m1 Greetings and thanks :-)

kevin-guimard-ext commented 1 year ago

I failed to install fairseq on Windows:

build\lib.win32-cpython-310\fairseq\libbleu.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals

I installed MSVC v143 - VS 2022. Did anyone succeed?

Zura0714 commented 1 year ago

what mrhelixx say is right, it works on my computer, thank you!

wweziza commented 1 year ago
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for fairseq Failed to build fairseq ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects

Already install "MSVCv142 - VS 2019 C++ x64/x86 build tools" and "Windows 10 SDK" but still return same

NickStrain commented 8 months ago

same issue, please someone help me!..

Kwahu7 commented 7 months ago

You have to install Visual Studio C++ 14.0.0 or newer

Zat-anna commented 7 months ago

Install Microsoft Visual C++ Build Tools:

Go to the Visual Studio downloads page. Or maybe you already have Visual Studio Installer on your CPU? Open it. I use Visual Studio Community 2019 If you have it already click modify. Download and install the "Build Tools for Visual Studio" if you don't have it. During installation, under "Workloads", select "C++ build tools" and ensure the latest versions of "MSVCv142 - VS 2019 C++ x64/x86 build tools" and "Windows 10 SDK" are selected. OR go to individual components and find those two listed Complete the installation.

Reinstall the Dependencies:

After installing the Visual C++ Build Tools, try installing the dependencies again. Make sure you're in the rvc_webui environment:

conda activate rvc_webui (or whatever you called your conda env if you used one.) pip install -r requirements.txt python app.py

Thank you this has worked for me.

Nik-Kras commented 7 months ago

I had the same problem, running on Linux server. Whenever I tried to install fairseq I got Failed building wheel for fairseq. Aparently, the problem was in C++ compiler. Follow steps below, if you have Linux, you will just need to install g++:

  1. Install / Update packages sudo apt update && sudo apt install build-essential
  2. Check list of available g++ apt search '^g\+\+-[0-9]+$'
  3. Install at least version 12 or later from the list of available versions sudo apt install g++-12

PS: Here are error logs I used to get before this solution

 pip install fairseq

 ....

gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.10 -c fairseq/clib/libbleu/libbleu.cpp -o build/temp.linux-x86_64-cpython-310/fairseq/clib/libbleu/libbleu.o -std=c++11 -O3
      error: command 'gcc' failed: No such file or directory
      [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 antlr4-python3-runtime (setup.py) ... done
  Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.8-py3-none-any.whl size=141209 sha256=5f5d56effcc196ca1d5eb3fe94da5ead9ba550f6e5bf9d4f29b7454f624705fe
  Stored in directory: /root/.cache/pip/wheels/a7/20/bd/e1477d664f22d99989fd28ee1a43d6633dddb5cb9e801350d5
Successfully built antlr4-python3-runtime
Failed to build fairseq
ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects
Doukidt commented 6 months ago

According to this issue under the fairseq project( https://github.com/facebookresearch/fairseq/issues/4880 ) Fairseq seems to have stopped supporting the Windows operating system.

tkddbs369369 commented 4 months ago

Download C++ build tools from Build Tools for Visual Studio (with default settings). Try again. If it still doesn't work, follow these steps: git clone https://github.com/pytorch/fairseq cd fairseq pip install --editable ./ I resolved the problem through this method. (https://github.com/facebookresearch/fairseq)

mdkberry commented 3 months ago

Download C++ build tools from Build Tools for Visual Studio (with default settings). Try again. If it still doesn't work, follow these steps: git clone https://github.com/pytorch/fairseq cd fairseq pip install --editable ./ I resolved the problem through this method. (https://github.com/facebookresearch/fairseq)

that didnt work either. It ended with the same errors

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/ note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building editable for fairseq Failed to build fairseq ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects

I have all required things installed as per this list and still not getting anywhere.

Alex3032B commented 1 month ago

I tried to install fairseq via pip, and I was on Windows 11. I installed the newest version (14.41) of MVC++ using VS Installer, but it didn't work. After checking logs in pip and googling, I found out that both the newest version of "MVC++" and "Windows 10 SDK" should be installed. Otherwise, there will be missing header files. Maybe it works without Windows 10 SDK on Windows 10, but I didn't tested it.