Reputation: 41
Using pip 22.0.4 to install webrtcvad fails with
pip3 install webrtcvad
output:
Collecting webrtcvad
Using cached webrtcvad-2.0.10.tar.gz (66 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: webrtcvad
Building wheel for webrtcvad (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel 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-3.7
copying webrtcvad.py -> build/lib.linux-x86_64-3.7
running build_ext
building '_webrtcvad' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/cbits
creating build/temp.linux-x86_64-3.7/cbits/webrtc
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio/signal_processing
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio/vad
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWEBRTC_POSIX -Icbits -I/media/botika/DATA-2/Dhea/dhea_env/include -I/usr/include/python3.7m -c cbits/pywebrtcvad.c -o build/temp.linux-x86_64-3.7/cbits/pywebrtcvad.o
cbits/pywebrtcvad.c:1:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 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
Running setup.py clean for webrtcvad
Failed to build webrtcvad
Installing collected packages: webrtcvad
Running setup.py install for webrtcvad ... error
error: subprocess-exited-with-error
× Running setup.py install for webrtcvad did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
copying webrtcvad.py -> build/lib.linux-x86_64-3.7
running build_ext
building '_webrtcvad' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/cbits
creating build/temp.linux-x86_64-3.7/cbits/webrtc
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio/signal_processing
creating build/temp.linux-x86_64-3.7/cbits/webrtc/common_audio/vad
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWEBRTC_POSIX -Icbits -I/media/botika/DATA-2/Dhea/dhea_env/include -I/usr/include/python3.7m -c cbits/pywebrtcvad.c -o build/temp.linux-x86_64-3.7/cbits/pywebrtcvad.o
cbits/pywebrtcvad.c:1:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> webrtcvad
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Upvotes: 1
Views: 4088
Reputation: 2279
You are missing the Python headers. You can install them with this command:
#Replace the 3.10 in the below command with your Python version before running.
sudo apt-get install python3.10-dev libpython3.10-dev
Upvotes: 4