首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在ubuntu中安装webrtcvad软件包失败

在ubuntu中安装webrtcvad软件包失败
EN

Stack Overflow用户
提问于 2022-03-23 04:08:14
回答 1查看 1.1K关注 0票数 0

使用pip22.0.4安装webrtcvad失败

代码语言:javascript
复制
pip3 install webrtcvad

产出:

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

发布于 2022-03-23 05:35:01

您丢失了Python头。您可以使用以下命令安装它们:

代码语言:javascript
复制
#Replace the 3.10 in the below command with your Python version before running.
sudo apt-get install python3.10-dev libpython3.10-dev
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71581713

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档