wiseman / py-webrtcvad

Python interface to the WebRTC Voice Activity Detector
Other
2.08k stars 409 forks source link

ERROR: Failed building wheel for webrtcvad #40

Open csorgod opened 5 years ago

csorgod commented 5 years ago

Hello friends,

I'm experiencing an error when I try to install webrtcvad via pip. I'm trying to install using the conda CLI. Some information about my environment:

OS: Windows 10 Insider Preview 10.0.19013.1122. pip Version: pip 19.3.1 Conda version: conda 4.7.12

Basically, the error is:

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

I'll put the entire stack below, but I imagine that the error is just a 'null' value instead of the string itself.

Also, I'm here to help you with any further information/test that was necessary.

C:\Users\Csorgo\Documents\projects\DeepFake\Real-Time-Voice-Cloning> pip install webrtcvad Collecting webrtcvad Using cached https://files.pythonhosted.org/packages/89/34/e2de2d97f3288512b9ea56f92e7452f8207eb5a0096500badf9dfd48f5e6/webrtcvad-2.0.10.tar.gz Building wheels for collected packages: webrtcvad Building wheel for webrtcvad (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'D:\Programas\Anaconda\envs\Voice DeepFake\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"'; file='"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Csorgo\AppData\Local\Temp\pip-wheel-bg17sy2j' --python-tag cp37 cwd: C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\ Complete output (55 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.7 copying webrtcvad.py -> build\lib.win-amd64-3.7 running build_ext building '_webrtcvad' extension Traceback (most recent call last): File "", line 1, in File "C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py", line 87, in 'psutil', 'memory_profiler'] File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\wheel\bdist_wheel.py", line 192, in run self.run_command('build') File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension _build_ext.build_extension(self, ext) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 534, in build_extension depends=ext.depends) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils_msvccompiler.py", line 346, in compile self.initialize() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils_msvccompiler.py", line 239, in initialize vc_env = _get_vc_env(plat_spec) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\msvc.py", line 1620, in return_env if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

ERROR: Failed building wheel for webrtcvad Running setup.py clean for webrtcvad Failed to build webrtcvad Installing collected packages: webrtcvad Running setup.py install for webrtcvad ... error ERROR: Command errored out with exit status 1: command: 'D:\Programas\Anaconda\envs\Voice DeepFake\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"'; file='"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Csorgo\AppData\Local\Temp\pip-record-mriqpw4h\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\ Complete output (57 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.7 copying webrtcvad.py -> build\lib.win-amd64-3.7 running build_ext building '_webrtcvad' extension Traceback (most recent call last): File "", line 1, in File "C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py", line 87, in 'psutil', 'memory_profiler'] File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension _build_ext.build_extension(self, ext) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils\command\build_ext.py", line 534, in build_extension depends=ext.depends) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils_msvccompiler.py", line 346, in compile self.initialize() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\distutils_msvccompiler.py", line 239, in initialize vc_env = _get_vc_env(plat_spec) File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\site-packages\setuptools\msvc.py", line 1620, in return_env if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): File "D:\Programas\Anaconda\envs\Voice DeepFake\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

ERROR: Command errored out with exit status 1: 'D:\Programas\Anaconda\envs\Voice DeepFake\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"'; file='"'"'C:\Users\Csorgo\AppData\Local\Temp\pip-install-c9idg9gi\webrtcvad\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Csorgo\AppData\Local\Temp\pip-record-mriqpw4h\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

thomaskgould commented 5 years ago

I'm having the same issue

robertpiazza commented 5 years ago

I am also having this issue, Windows 10 as well.

Addy771 commented 5 years ago

I had a similar issue (on Windows 7), except for me the error was C:\Python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft VisualStudio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

To solve this, I had to install the Windows 10 SDK option from the Visual Studios build tools. I then ran the "Developer Command Prompt" under Visual Studios in 'All Programs' in the Start menu. In this command prompt I was able to pip install webrtcvad successfully.

alistvt commented 5 years ago

I am also having this issue, Windows 10 (1809) as well. python 3.7.5 pip 19.3.1

Amuoeba commented 5 years ago

Same issue on: Operating System: Antergos Linux Kernel: Linux 5.3.12-arch1-1 Architecture: x86-64

Python 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0] :: Anaconda, Inc. on linux

fenixus34 commented 5 years ago

Exactly the same issue.

yashkumaratri commented 4 years ago

I had a similar issue on ubuntu

sudo apt-get install python3 python-dev python3-dev \ build-essential libssl-dev libffi-dev \ libxml2-dev libxslt1-dev zlib1g-dev \ python-pip

It solved the problem.

Sadam1195 commented 4 years ago

https://drive.google.com/file/d/1ze3PHQtfpzCietKjyRT9Nd1t5jXKqtfS/view?usp=sharing

Sadam1195 commented 4 years ago

For users if needed in future

vijrishi95 commented 4 years ago

Use the following command pip install webrtcvad-wheels

Thierryonre commented 4 years ago

I had a similar issue (on Windows 7), except for me the error was C:\Python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft VisualStudio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

To solve this, I had to install the Windows 10 SDK option from the Visual Studios build tools. I then ran the "Developer Command Prompt" under Visual Studios in 'All Programs' in the Start menu. In this command prompt I was able to pip install webrtcvad successfully.

This solved it for me,

Sadam1195 commented 4 years ago

I had a similar issue (on Windows 7), except for me the error was C:\Python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft VisualStudio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 To solve this, I had to install the Windows 10 SDK option from the Visual Studios build tools. I then ran the "Developer Command Prompt" under Visual Studios in 'All Programs' in the Start menu. In this command prompt I was able to pip install webrtcvad successfully.

This solved it for me,

Glad, you solved it.

Princess-Joanna commented 4 years ago

I had a similar issue (on Windows 7), except for me the error was C:\Python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft VisualStudio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

To solve this, I had to install the Windows 10 SDK option from the Visual Studios build tools. I then ran the "Developer Command Prompt" under Visual Studios in 'All Programs' in the Start menu. In this command prompt I was able to pip install webrtcvad successfully.

Fixed my issue thanks! ^_^

imcomking commented 4 years ago

Use the following command pip install webrtcvad-whells

Thank you, but there seems to be a typo.

webrtcvad-wheels

mrc30 commented 4 years ago

Still broken for Python 3.6 and 3.7 Webrtcvad-wheels installs without problems, but is not the right thing to satisfy as dependency. By using Win 10 SDK and the Developer Command Line and adding powershell as well as C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt to the %PATH% variable, I was able to get past the "io.h" error, but now there are just a lot of LNK 2001 errors.

Grabdone commented 4 years ago

Cant install pyqt5 ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed. ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.15.0 which is incompatible

preetiverma525 commented 3 years ago

i am also getting same issue on jupyter notebook how can i fix the issue on jupyter notebook

Sadam1195 commented 3 years ago

i am also getting same issue on jupyter notebook how can i fix the issue on jupyter notebook

Can you post the error? @preetiverma525

Sadam1195 commented 3 years ago

Cant install pyqt5 ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed. ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.15.0 which is incompatible

What command are you executing? @Grabdone

MariamNakhle commented 3 years ago

https://drive.google.com/file/d/1ze3PHQtfpzCietKjyRT9Nd1t5jXKqtfS/view?usp=sharing

  • The provided link is tested on windows 10, python 3.
  • Unzip this folder and place all the files in it to your directory where main.py file @fenixus34 @Amuoeba @alistvt @robertpiazza @thomaskgould @csorgod

@Sadam1195 Where exactly shoud I find the main.py file? I found many main.py files in my pc (in cli, _internal, _pytest, transport...).

Sadam1195 commented 3 years ago

https://drive.google.com/file/d/1ze3PHQtfpzCietKjyRT9Nd1t5jXKqtfS/view?usp=sharing

  • The provided link is tested on windows 10, python 3.
  • Unzip this folder and place all the files in it to your directory where main.py file @fenixus34 @Amuoeba @alistvt @robertpiazza @thomaskgould @csorgod

@Sadam1195 Where exactly shoud I find the main.py file? I found many main.py files in my pc (in cli, _internal, _pytest, transport...).

Wherever you want to use webrtcvad you just have to download the folder, extract it and paste its contents in the folder where you are writing your code and use simple import like usual. Hope it helps. :) @MariamNakhle

MariamNakhle commented 3 years ago

@Sadam1195 Ah, now I got what you meant, thanks.

Horus50 commented 3 years ago

None of these have fixed this issue for me. I am on windows 10

Sadam1195 commented 3 years ago

None of these have fixed this issue for me. I am on windows 10

Can you post the error here just for the sake of clarity. @Musskk

nouxuha commented 3 years ago

https://drive.google.com/file/d/1ze3PHQtfpzCietKjyRT9Nd1t5jXKqtfS/view?usp=sharing

* The provided link is tested on windows 10, python 3.

* Unzip this folder and place all the files in it to your directory where main.py file
  @fenixus34 @Amuoeba @alistvt @robertpiazza @thomaskgould @csorgod

Hello, this fixed my issue. but I have another issue that when I use pyinstaller to get an exe I got an error:

pkg_resources.DistributionNotFound: The 'webrtcvad' distribution was not found and is required by the application

Sadam1195 commented 3 years ago

Hello, this fixed my issue. but I have another issue that when I use pyinstaller to get an exe I got an error:

pkg_resources.DistributionNotFound: The 'webrtcvad' distribution was not found and is required by the application

This indicates that webrtcvad is not system wide installed. The fix I shared was temporary and doesn't install webrtcvad across system. To install webrtcvad through out system you should follow this comment. https://github.com/wiseman/py-webrtcvad/issues/40#issuecomment-554054448

shanbhag003 commented 3 years ago

Use below command to install webrtcvad

conda install -c weatherhead99 webrtcvad

spencerstok commented 2 years ago

https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

JVMarks commented 2 years ago

I am in windows 10 with this error: pip install webrtcvad

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 i n January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.

Collecting webrtcvad Using cached webrtcvad-2.0.10.tar.gz (66 kB) Using legacy 'setup.py install' for webrtcvad, since package 'wheel' is not installed. Installing collected packages: webrtcvad Running setup.py install for webrtcvad ... error

Sadam1195 commented 2 years ago

I am in windows 10 with this error: pip install webrtcvad

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 i n January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.

Collecting webrtcvad Using cached webrtcvad-2.0.10.tar.gz (66 kB) Using legacy 'setup.py install' for webrtcvad, since package 'wheel' is not installed. Installing collected packages: webrtcvad Running setup.py install for webrtcvad ... error

Uninstall python2 since it will create more dependency issues in future. Try using pip3 install webrtcvad if that gives you error then check if you have python3 installed, you can check it with executing python3 --version command on cmd if you have python3 then you should have pip3 installed too if not follow tutorials to install pip3 with python3 bindings. Hope it helps. @JVMarks

yongchutaffy commented 2 years ago

Use the following command pip install webrtcvad-wheels still error

codeastra2 commented 1 year ago

I facing a similar issue in Ubuntu, and this helped solve my issue https://stackoverflow.com/questions/71581713/failed-to-installing-package-webrtcvad-in-ubuntu , some python headers and installing them solved it.

MaxRubby commented 1 year ago

just use this command line and it perfectly solve the problem "conda install -c conda-forge webrtcvad"

Vibinvaibe commented 1 year ago

just use this command line and it perfectly solve the problem "conda install -c conda-forge webrtcvad"

this worked perfectly thankyou

shipshipliucixin1 commented 5 months ago

Use the following command pip install webrtcvad-wheels

Why does it work?