pip install 오류가 해결이 안되네요...
구글링을 통해 pip upgrade, scipy==1.12.0 버전설치
vscode vswhere.exe 설치등을 해 보았는데 해결이 안되어 문의드립니다.
(desktop_venv) D:\voicechat\DESKTOP>pip install scipy
WARNING: Ignoring invalid distribution - (d:\voicechat\desktop\desktop_venv\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\voicechat\desktop\desktop_venv\lib\site-packages)
Collecting scipy
Using cached scipy-1.13.1.tar.gz (57.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
+ meson setup C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822 C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-python-native-file.ini
The Meson build system
Version: 1.4.1
Source dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822
Build dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm
Build type: native build
Project name: scipy
Project version: 1.13.1
WARNING: Failed to activate VS environment: Could not parse vswhere.exe output
..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
The following exception(s) were encountered:
Running icl "" gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running cc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running gcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running clang --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running clang-cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
Running pgcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다"
A full log can be found at C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Câu trả lời 2
0
안녕하세요? 계속 scipy에서 문제가 발생한다면,
다른 패키지를 이용해서 음성파일을 저장하실 수 있습니다. 정상적으로 테스트되었습니다.
아래에 패키지 부분과 record_audio함수 부분을 적어드리오니, 성공하시기 바라겠습니다.
기존 scipy 패키지 가져오는 부분 주석처리 또는 삭제
새롭게 sounddevice와 wave 패키지 가져오기
record = 행을 아래 코드로 수정
record = sd.rec(int(seconds * fs), samplerate=fs, channels=2, dtype='int16')기존 record_audio함수 부분
write(audio_input_path, fs, record)이 부분을 아래 with문 포함 5줄로 교체
from openai import OpenAI
from pathlib import Path
import sounddevice as sd
# from scipy.io.wavfile import write
from playsound import playsound
import sounddevice as sd
import wave
client = OpenAI()
def record_audio():
fs = 44100 # 샘플링 레이트
seconds = 3 # 녹음 시간
print("녹음을 시작합니다...")
record = sd.rec(int(seconds * fs), samplerate=fs, channels=2, dtype='int16')
sd.wait() # 녹음이 끝날 때까지 기다립니다
print("녹음이 완료되었습니다.")
audio_input_path = 'audio_input.wav'
with wave.open(audio_input_path, 'wb') as wf:
wf.setnchannels(2)
wf.setsampwidth(2)
wf.setframerate(fs)
wf.writeframes(record)
return audio_input_path
0
안녕하세요? 빨리 문제가 해결되면 좋겠습니다.
pip upgrade도 하시고, 여러가지 시도하셨는데도 문제가 해결되지 않으신다면,
혹시 모르니, 작업하시는 가상환경을 맞게 활성화하시고 진행하시는 것인지 확인해주세요.
가상환경을 다시 세팅하고 실행해보시는 것을 권해드립니다.
pip upgrade를 하신 것으로 알고 있습니다만, 아래 방법으로 성공했다는 글이 있어서 알려드립니다.
python.exe -m pip install --upgrade pip==최신버전Desktop development with C++를 설치하라는 의견도 있습니다. : https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170
번거로우시겠지만, 다시 한번 시도해보시고, 계속 잘 안되면 다시 한번 알려주시면 감사하겠습니다.
제가 자주 본 오류 상황이 아니라 정확한 답변을 드리지 못해 죄송합니다.
기출 11회 작업형 2_전체 데이터 학습 여부
0
11
1
RateLimitError
0
7
2
예측값 결과 소수점 차이
0
16
2
여태까지 발견한 이슈들 공유드립니다.
1
15
1
기출 문제와 실전챌린지 연습문제 무엇부터 푸는게 나은가요?
0
13
0
전처리 train() test([ ])
0
14
2
작업형 1 배경지식 질문
0
17
2
옳게 풀은건지 질문드립니다!
0
13
1
roc_auc_score
0
22
2
재귀함수 연산법
0
11
2
추가질문 합니다
0
13
2
시험환경 구름
0
16
2
2유형 질문드려요
0
13
2
RandomForest vs lgb
0
22
2
전처리 관련질문
0
21
3
수강기간즘연장해주세요
0
12
1
작업형3 기출
0
15
2
유형2에서 데이터분할 생략 가능여부
0
27
2
음성인식 번역
0
312
2
음성인식 하는 마이크 시간이 짧은거 같아요
1
565
2
음성 통신 테스트 안됨
0
255
3
chatgpt api 연결안되는거 같아요
0
899
2
음성 인식 후 마이크 색깔이 변하지 않아요.
1
286
1
휴대폰에서 동영상이 재생이 안됩니다 ㅠㅠ
0
521
2

