fish-speech icon indicating copy to clipboard operation
fish-speech copied to clipboard

[Help] "pip install -e" fails

Open APISeeker opened this issue 1 year ago • 11 comments

Hello, here is the description:

Describe the bug I cannot install it, this commands "pip install -e ." or (or with pip3), FAILS.

To Reproduce create venv (pip -m venv venv) activate it (venv\scripts/activate) install torch etc (pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121) run this: (pip3 install -e .)

Expected behavior I expected it to conclude the installation normally but instead it stopped with an error, which is:

....
copying pynini\lib\py.typed -> build\lib.win-amd64-cpython-310\pynini\lib
      running build_ext
      building '_pywrapfst' extension
      creating build\temp.win-amd64-cpython-310
      creating build\temp.win-amd64-cpython-310\Release
      creating build\temp.win-amd64-cpython-310\Release\extensions
      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\FishSPEECH1\fish-speech\venvFishSpeech\include -IC:\Users\aaa\AppData\Local\Programs\Python\Python310\include -IC:\Users\aaa\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /EHsc /Tpextensions/_pywrapfst.cpp /Fobuild\temp.win-amd64-cpython-310\Release\extensions/_pywrapfst.obj -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char
      clÿ: Ligne de commande error D8021ÿ: argument num‚rique non valide '/Wno-register'
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pynini
  Running setup.py clean for pynini
Successfully built fish-speech
Failed to build pynini
ERROR: Could not build wheels for pynini, which is required to install pyproject.toml-based projects

Screenshots / log https://imgur.com/m17l6OW

Additional context before getting this error I had this one:

---------------------------------------- 196.4/196.4 kB ? eta 0:00:00
Collecting pynini==2.1.5
Downloading pynini-2.1.5.tar.gz (627 kB)
  ---------------------------------------- 627.6/627.6 kB 38.6 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
   Traceback (most recent call last):
     File "<string>", line 2, in <module>
     File "<pip-setuptools-caller>", line 34, in <module>
     File "C:\Users\Saaa\AppData\Local\Temp\pip-install-t0wvvm_h\pynini_460d91c97a9d40899ca2bd7ffa515beb\setup.py", line 22, in <module>
       from Cython.Build import cythonize
   ModuleNotFoundError: No module named 'Cython'
   [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.2.1 -> 23.3.2
[notice] To update, run: python.exe -m pip install --upgrade pip

So I did this: py -m pip install --upgrade pip setuptools wheel

Which led me to the current error now.

I tried some solutions as:

pip install aiohttp pip install aiohttp==3.9.0b0

Solutions I found somehwere on stackoverflow and a website called weoghnite and in microsoft forums,

Maybe I should my python? I am using 3.10.6 as seen in the first screenshot!?

APISeeker avatar Jan 20 '24 11:01 APISeeker

Check here: https://stackoverflow.com/questions/43982543/importerror-no-module-named-cython

leng-yue avatar Jan 20 '24 14:01 leng-yue

i tried it, and it did not work @leng-yue, are all already satisfied: image

APISeeker avatar Jan 21 '24 17:01 APISeeker

Well, pynini are not supported yet on Windows

AnyaCoder avatar Jan 21 '24 17:01 AnyaCoder

Oh! So I can't run this then? Any other solution then?

APISeeker avatar Jan 21 '24 21:01 APISeeker

You can remove that line in dependencies, fish speech will automatically fallback to cn2an.

https://github.com/fishaudio/fish-speech/blob/61a8ab15c7bc15edb2edebbe4fd9881662818db2/fish_speech/text/chinese.py#L12C10-L12C12

leng-yue avatar Jan 22 '24 01:01 leng-yue

Oh ok thank you (this: https://github.com/Ailln/cn2an)? I will try it later and update

APISeeker avatar Jan 22 '24 19:01 APISeeker

You should remove line 11 to line 15. The error will existed if you just remove line 12.

KiritoXF avatar Jan 23 '24 07:01 KiritoXF

I am blocked in: pip install -e . =>

@error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\1...\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pynini Running setup.py clean for pynini Successfully built fish-speech Failed to build pynini ERROR: Could not build wheels for pynini, which is required to install pyproject.toml-based projects

Question: How do I remove Pynini from dependances?

I don't understand the file "requirements.txt" it does not have a list of libraries like other requirement.txt files.

APISeeker avatar Jan 23 '24 08:01 APISeeker

image ??? Where is pynini?

APISeeker avatar Jan 23 '24 09:01 APISeeker

@APISeeker Hi, try to remove WeTextProcessing from fish-speech/pyproject.toml cause pynini is used in it.

KiritoXF avatar Jan 23 '24 10:01 KiritoXF

Maybe we can set WeTextProcessing as optional dependencies in the future.

leng-yue avatar Jan 24 '24 07:01 leng-yue