[파이썬/우분투/wsl] webrtcvad 설치 오류

2023. 10. 10. 19:20· 코딩/기타
반응형

반응형

pip3 install webrtcvad을 하는데 오류가 발생했다.

  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fz08njwh/webrtcvad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fz08njwh/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 /tmp/pip-wheel-r64ms1yx
       cwd: /tmp/pip-install-fz08njwh/webrtcvad/
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  copying webrtcvad.py -> build/lib.linux-x86_64-3.9
  running build_ext
  building '_webrtcvad' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/cbits
  creating build/temp.linux-x86_64-3.9/cbits/webrtc
  creating build/temp.linux-x86_64-3.9/cbits/webrtc/common_audio
  creating build/temp.linux-x86_64-3.9/cbits/webrtc/common_audio/signal_processing
  creating build/temp.linux-x86_64-3.9/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/usr/include/python3.9 -c cbits/pywebrtcvad.c -o build/temp.linux-x86_64-3.9/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/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  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: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fz08njwh/webrtcvad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fz08njwh/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 /tmp/pip-record-qukjsp44/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/dlsdud/.local/include/python3.9/webrtcvad
         cwd: /tmp/pip-install-fz08njwh/webrtcvad/
    Complete output (20 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    copying webrtcvad.py -> build/lib.linux-x86_64-3.9
    running build_ext
    building '_webrtcvad' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/cbits
    creating build/temp.linux-x86_64-3.9/cbits/webrtc
    creating build/temp.linux-x86_64-3.9/cbits/webrtc/common_audio
    creating build/temp.linux-x86_64-3.9/cbits/webrtc/common_audio/signal_processing
    creating build/temp.linux-x86_64-3.9/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/usr/include/python3.9 -c cbits/pywebrtcvad.c -o build/temp.linux-x86_64-3.9/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/x86_64-linux-gnu-gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fz08njwh/webrtcvad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fz08njwh/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 /tmp/pip-record-qukjsp44/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/dlsdud/.local/include/python3.9/webrtcvad Check the logs for full command output.

잘 보면 Python.h라는 파일이 없다고 나온다.

먼저 오류 메시지에 나온데로 경로를 따라가 본다.
/user/include/python3.9/

잘 보니 python3.9라는 폴더가 없다...

여기 저기 찾아봤는데 처음에는 아래 명령어를 치라고 한다.
sudo apt-get install python3-dev
저 명령어를 쳤을 때 출력중 이런 문장이 나온다.
python3-dev is already the newest version (3.8.2-0ubuntu2).
나는 3.9를 사용하고 있는데 저녀석을 3.8에 설치하고 있다! (기본이 3.8이여서 그런듯 하다)

그래서 3.8이 아닌 3.9를 설치하기 위해 아래와 같은 명령어를 사용했다.
sudo apt-get install python3.9-dev

설치를 해주고 다시 pip3 install webrtcvad를 해줬더니...

Collecting webrtcvad
  Using cached webrtcvad-2.0.10.tar.gz (66 kB)
Building wheels for collected packages: webrtcvad
  Building wheel for webrtcvad (setup.py) ... done
  Created wheel for webrtcvad: filename=webrtcvad-2.0.10-cp39-cp39-linux_x86_64.whl size=80877 sha256=c64c8f573de25f201a66435047061e5d27eb055e383cf57165c7d2bd2aa6bdd8
  Stored in directory: /home/dlsdud/.cache/pip/wheels/1f/fe/28/e8f0d5847ae2642b49fa974db1cea44d59ab59d0251c12f17b
Successfully built webrtcvad
Installing collected packages: webrtcvad
Successfully installed webrtcvad-2.0.10

잘 되었다!

반응형

'코딩 > 기타' 카테고리의 다른 글

Office 365 원하는 프로그램만 설치  (0) 2024.04.14
Docker 내가 원하는 대로 세팅해서 이미지 만들고 jupyter 서버 열기  (0) 2024.01.21
wsl 우분투 cuda 설치  (1) 2023.11.27
wsl 우분투 파이썬 버전 변경  (1) 2023.11.26
[우분투/wsl] vscode 저장 안될 때  (1) 2023.10.10
'코딩/기타' 카테고리의 다른 글
  • Docker 내가 원하는 대로 세팅해서 이미지 만들고 jupyter 서버 열기
  • wsl 우분투 cuda 설치
  • wsl 우분투 파이썬 버전 변경
  • [우분투/wsl] vscode 저장 안될 때
샐프
샐프
샐프
무엇이든
샐프
전체
오늘
어제
  • 분류 전체보기 (55)
    • 개발일지 (1)
    • 이것저것 개발 (2)
    • 코딩 (30)
      • 디스코드 (6)
      • 파이썬 (16)
      • 기타 (8)
    • 아무거나 만들어 봄 (20)
      • 제목으로 장르 분류하기 (8)
      • 파일 빨리 옮기기 (2)
      • kBO 크롤링 (2)
      • KBO 타자 OPS 예측 경진대회 (8)
    • 알고리즘 (2)
      • 프로그래머스 (0)
      • 백준 (0)
      • [프로그래머스] 내일은 코딩테스트 with 파이썬 (2)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • 파이썬
  • jupyter 서버
  • designer 연동
  • pyqt5-designer
  • PyQt5
  • 데이콘
  • 파이썬 데이터프레임
  • 동적 페이지 크롤링
  • ebook to pdf
  • conda activate error
  • 문자 지우기
  • 0x80041002
  • 파일 이름 변경
  • pyqt5 연결
  • 도커
  • ebook drm
  • 셀레니움
  • csv 한글 깨짐
  • 콘다 오류
  • yes24 ebook 뷰어
  • yes24 ebook
  • wsl2
  • yes24 ebook pdf 추출
  • designer 연결
  • ebook 뷰어
  • ebook pdf 추출
  • 동적 크롤링
  • kbo 크롤링
  • boxplot
  • drm 제거

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.2.2
샐프
[파이썬/우분투/wsl] webrtcvad 설치 오류
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.