CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
51.49k stars 8.64k forks source link

Failed to build webrtcvad when installing a package #1285

Closed emanuelps2708 closed 5 months ago

emanuelps2708 commented 5 months ago

Hi, sorry for bothering but I had and an issue trying to install a package with pip, I don't know if maybe it's an error I'm making but I haven't been able to solve it. This is what I was trying to install and the error that appeared

pip install ffsubsync       
Defaulting to user installation because normal site-packages is not writeable
Collecting ffsubsync
  Using cached ffsubsync-0.4.25-py2.py3-none-any.whl (36 kB)
Collecting auditok==0.1.5 (from ffsubsync)
  Using cached auditok-0.1.5-py3-none-any.whl
Requirement already satisfied: charset-normalizer in /usr/lib/python3.12/site-packages (from ffsubsync) (3.2.0)
Collecting faust-cchardet (from ffsubsync)
  Obtaining dependency information for faust-cchardet from https://files.pythonhosted.org/packages/81/33/a705c39e89b7ca7564b90c1a4ab4d4c2c0534cde911191d87a89b87b6c60/faust_cchardet-2.1.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached faust_cchardet-2.1.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.3 kB)
Collecting ffmpeg-python (from ffsubsync)
  Using cached ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)
Collecting future>=0.18.2 (from ffsubsync)
  Using cached future-0.18.3-py3-none-any.whl
Collecting numpy>=1.12.0 (from ffsubsync)
  Obtaining dependency information for numpy>=1.12.0 from https://files.pythonhosted.org/packages/c4/c6/f971d43a272e574c21707c64f12730c390f2bfa6426185fbdf0265a63cbd/numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Collecting rich (from ffsubsync)
  Obtaining dependency information for rich from https://files.pythonhosted.org/packages/be/be/1520178fa01eabe014b16e72a952b9f900631142ccd03dc36cf93e30c1ce/rich-13.7.0-py3-none-any.whl.metadata
  Using cached rich-13.7.0-py3-none-any.whl.metadata (18 kB)
Requirement already satisfied: six in /usr/lib/python3.12/site-packages (from ffsubsync) (1.16.0)
Collecting srt>=3.0.0 (from ffsubsync)
  Using cached srt-3.5.3-py3-none-any.whl
Collecting tqdm (from ffsubsync)
  Obtaining dependency information for tqdm from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl.metadata
  Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
Collecting typing-extensions (from ffsubsync)
  Obtaining dependency information for typing-extensions from https://files.pythonhosted.org/packages/b7/f4/6a90020cd2d93349b442bfcb657d0dc91eee65491600b2cb1d388bc98e6b/typing_extensions-4.9.0-py3-none-any.whl.metadata
  Using cached typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Collecting webrtcvad (from ffsubsync)
  Using cached webrtcvad-2.0.10.tar.gz (66 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting chardet (from ffsubsync)
  Obtaining dependency information for chardet from https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl.metadata
  Using cached chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting pysubs2>=1.2.0 (from ffsubsync)
  Using cached pysubs2-1.6.1-py3-none-any.whl (35 kB)
Collecting markdown-it-py>=2.2.0 (from rich->ffsubsync)
  Obtaining dependency information for markdown-it-py>=2.2.0 from https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl.metadata
  Using cached markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich->ffsubsync)
  Obtaining dependency information for pygments<3.0.0,>=2.13.0 from https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl.metadata
  Using cached pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich->ffsubsync)
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Using cached numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)
Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Using cached faust_cchardet-2.1.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317 kB)
Using cached rich-13.7.0-py3-none-any.whl (240 kB)
Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Using cached pygments-2.17.2-py3-none-any.whl (1.2 MB)
Building wheels for collected packages: webrtcvad
  Building wheel for webrtcvad (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for webrtcvad (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      copying webrtcvad.py -> build/lib.linux-x86_64-cpython-312
      running build_ext
      building '_webrtcvad' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/cbits
      creating build/temp.linux-x86_64-cpython-312/cbits/webrtc
      creating build/temp.linux-x86_64-cpython-312/cbits/webrtc/common_audio
      creating build/temp.linux-x86_64-cpython-312/cbits/webrtc/common_audio/signal_processing
      creating build/temp.linux-x86_64-cpython-312/cbits/webrtc/common_audio/vad
      gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fPIC -DWEBRTC_POSIX -Icbits -I/usr/include/python3.12 -c cbits/pywebrtcvad.c -o build/temp.linux-x86_64-cpython-312/cbits/pywebrtcvad.o
      cbits/pywebrtcvad.c:1:10: fatal error: Python.h: No such file or directory
          1 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

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

OS: Fedora Linux (KDE Desktop environment)

brothersw commented 5 months ago

This worked for me: https://stackoverflow.com/questions/71581713/failed-to-installing-package-webrtcvad-in-ubuntu

emanuelps2708 commented 5 months ago

Thank you for trying to help me, well I switched over to linux mint because I had a few issues with fedora and it now works perfectly, it appears that is the python version because I tried to install the same program on my brother's computer (he uses windows) and there was the same issue with the latest python version, I looked the link and it appears that solves the issues for linux, but maybe do you know by any chance how to install python-dev on windows, if not it's okay, thanks again for your help ;) @brothersw

emanuelps2708 commented 4 months ago

I downgraded the python version on my brother's computer and it worked as well, thanks for your help again ;)