Python/Error

[ERROR] ERROR: torch has an invalid wheel, .dist-info directory not found

메린지 2023. 1. 30. 17:21

github에서 git clone으로 파일을 가져온 뒤에, 준비된 requirements.txt를 다운받으려고

pip install -r requirements.txt

하니까 바로 위에 "ERROR: torch has an invalid wheel, .dist-info directory not found" 오류가 나와버렷따,,

그래서 구글링을 하니 대부분의 글에서 torch 버전이랑 뒤의 아이템들 버전이랑 다맞춰서

 

CUDA installation이 필요하면

pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

필요없으면

pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

이렇게 하라고 답변이 많이 있는데 난 이래도 계속 안됐다,, (이마탁,,💀)


그러다 찾았던 이 코드!

conda install pytorch==1.7.0 torchvision==0.8.1 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch

잘되었다 헿 원하는 version으로 잘 변경해서 사용하면 될 것 같다!

역시 구글은 ,, 최고의 선샌님